llvm.org GIT mirror llvm / 22a2f6d
Use newly added API in MRegisterInfo and don't expose the allocatable register set anymore. Its users now use the MRegisterInfo API. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16061 91177308-0d34-0410-b5e6-96231b3b80d8 Alkis Evlogimenos 16 years ago
2 changed file(s) with 1 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
230230 /// register.
231231 VarInfo &getVarInfo(unsigned RegIdx);
232232
233 const std::vector& getAllocatablePhysicalRegisters() const {
234 return AllocatablePhysicalRegisters;
235 }
236
237233 void MarkVirtRegAliveInBlock(VarInfo &VRInfo, MachineBasicBlock *BB);
238234 void HandleVirtRegUse(VarInfo &VRInfo, MachineBasicBlock *MBB,
239235 MachineInstr *MI);
147147 RegInfo = MF.getTarget().getRegisterInfo();
148148 assert(RegInfo && "Target doesn't have register information?");
149149
150 // First time though, initialize AllocatablePhysicalRegisters for the target
151 if (AllocatablePhysicalRegisters.empty()) {
152 // Make space, initializing to false...
153 AllocatablePhysicalRegisters.resize(RegInfo->getNumRegs());
154
155 // Loop over all of the register classes...
156 for (MRegisterInfo::regclass_iterator RCI = RegInfo->regclass_begin(),
157 E = RegInfo->regclass_end(); RCI != E; ++RCI)
158 // Loop over all of the allocatable registers in the function...
159 for (TargetRegisterClass::iterator I = (*RCI)->allocation_order_begin(MF),
160 E = (*RCI)->allocation_order_end(MF); I != E; ++I)
161 AllocatablePhysicalRegisters[*I] = true; // The reg is allocatable!
162 }
150 AllocatablePhysicalRegisters = RegInfo->getAllocatableSet(MF);
163151
164152 // PhysRegInfo - Keep track of which instruction was the last use of a
165153 // physical register. This is a purely local property, because all physical