@@ -177,9 +177,9 @@ class InstrPosIndexes {
177177
178178class RegAllocFastImpl {
179179public:
180- RegAllocFastImpl (const RegClassFilterFunc F = nullptr ,
180+ RegAllocFastImpl (const RegAllocFilterFunc F = nullptr ,
181181 bool ClearVirtRegs_ = true )
182- : ShouldAllocateClass (F), StackSlotForVirtReg(-1 ),
182+ : ShouldAllocateRegisterImpl (F), StackSlotForVirtReg(-1 ),
183183 ClearVirtRegs (ClearVirtRegs_) {}
184184
185185private:
@@ -188,7 +188,7 @@ class RegAllocFastImpl {
188188 const TargetRegisterInfo *TRI = nullptr ;
189189 const TargetInstrInfo *TII = nullptr ;
190190 RegisterClassInfo RegClassInfo;
191- const RegClassFilterFunc ShouldAllocateClass ;
191+ const RegAllocFilterFunc ShouldAllocateRegisterImpl ;
192192
193193 // / Basic block currently being allocated.
194194 MachineBasicBlock *MBB = nullptr ;
@@ -397,7 +397,7 @@ class RegAllocFast : public MachineFunctionPass {
397397public:
398398 static char ID;
399399
400- RegAllocFast (const RegClassFilterFunc F = nullptr , bool ClearVirtRegs_ = true )
400+ RegAllocFast (const RegAllocFilterFunc F = nullptr , bool ClearVirtRegs_ = true )
401401 : MachineFunctionPass(ID), Impl(F, ClearVirtRegs_) {}
402402
403403 bool runOnMachineFunction (MachineFunction &MF) override {
@@ -440,10 +440,10 @@ INITIALIZE_PASS(RegAllocFast, "regallocfast", "Fast Register Allocator", false,
440440
441441bool RegAllocFastImpl::shouldAllocateRegister(const Register Reg) const {
442442 assert (Reg.isVirtual ());
443- if (!ShouldAllocateClass )
443+ if (!ShouldAllocateRegisterImpl )
444444 return true ;
445- const TargetRegisterClass &RC = *MRI-> getRegClass (Reg);
446- return ShouldAllocateClass (*TRI, RC );
445+
446+ return ShouldAllocateRegisterImpl (*TRI, *MRI, Reg );
447447}
448448
449449void RegAllocFastImpl::setPhysRegState (MCPhysReg PhysReg, unsigned NewState) {
@@ -1841,7 +1841,7 @@ void RegAllocFastPass::printPipeline(
18411841
18421842FunctionPass *llvm::createFastRegisterAllocator () { return new RegAllocFast (); }
18431843
1844- FunctionPass *llvm::createFastRegisterAllocator (RegClassFilterFunc Ftor,
1844+ FunctionPass *llvm::createFastRegisterAllocator (RegAllocFilterFunc Ftor,
18451845 bool ClearVirtRegs) {
18461846 return new RegAllocFast (Ftor, ClearVirtRegs);
18471847}
0 commit comments