mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-30 16:17:05 +00:00 
			
		
		
		
	Switch most getReservedRegs() clients to the MRI equivalent.
Using the cached bit vector in MRI avoids comstantly allocating and recomputing the reserved register bit vector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165983 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		| @@ -15,8 +15,9 @@ | ||||
| //===----------------------------------------------------------------------===// | ||||
|  | ||||
| #define DEBUG_TYPE "regalloc" | ||||
| #include "llvm/CodeGen/MachineFunction.h" | ||||
| #include "llvm/CodeGen/RegisterClassInfo.h" | ||||
| #include "llvm/CodeGen/MachineFunction.h" | ||||
| #include "llvm/CodeGen/MachineRegisterInfo.h" | ||||
| #include "llvm/Target/TargetMachine.h" | ||||
| #include "llvm/Support/CommandLine.h" | ||||
| #include "llvm/Support/Debug.h" | ||||
| @@ -57,10 +58,11 @@ void RegisterClassInfo::runOnMachineFunction(const MachineFunction &mf) { | ||||
|   CalleeSaved = CSR; | ||||
|  | ||||
|   // Different reserved registers? | ||||
|   BitVector RR = TRI->getReservedRegs(*MF); | ||||
|   if (RR != Reserved) | ||||
|   const BitVector &RR = MF->getRegInfo().getReservedRegs(); | ||||
|   if (Reserved.size() != RR.size() || RR != Reserved) { | ||||
|     Update = true; | ||||
|   Reserved = RR; | ||||
|     Reserved = RR; | ||||
|   } | ||||
|  | ||||
|   // Invalidate cached information from previous function. | ||||
|   if (Update) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user