aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveVariables.cpp
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-08-26 22:23:32 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-08-26 22:23:32 +0000
commit22a2f6d5b05631a21b62e3e103aa1b9469ad0c5c (patch)
tree29f1fa2a2e02daa6194a47e07851e777cf293af4 /lib/CodeGen/LiveVariables.cpp
parent5327801fb87e3eda52a33f82e6211181030ecb93 (diff)
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
Diffstat (limited to 'lib/CodeGen/LiveVariables.cpp')
-rw-r--r--lib/CodeGen/LiveVariables.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp
index 0bdf86406f..b6d9bc2a60 100644
--- a/lib/CodeGen/LiveVariables.cpp
+++ b/lib/CodeGen/LiveVariables.cpp
@@ -148,19 +148,7 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &MF) {
RegInfo = MF.getTarget().getRegisterInfo();
assert(RegInfo && "Target doesn't have register information?");
- // First time though, initialize AllocatablePhysicalRegisters for the target
- if (AllocatablePhysicalRegisters.empty()) {
- // Make space, initializing to false...
- AllocatablePhysicalRegisters.resize(RegInfo->getNumRegs());
-
- // Loop over all of the register classes...
- for (MRegisterInfo::regclass_iterator RCI = RegInfo->regclass_begin(),
- E = RegInfo->regclass_end(); RCI != E; ++RCI)
- // Loop over all of the allocatable registers in the function...
- for (TargetRegisterClass::iterator I = (*RCI)->allocation_order_begin(MF),
- E = (*RCI)->allocation_order_end(MF); I != E; ++I)
- AllocatablePhysicalRegisters[*I] = true; // The reg is allocatable!
- }
+ AllocatablePhysicalRegisters = RegInfo->getAllocatableSet(MF);
// PhysRegInfo - Keep track of which instruction was the last use of a
// physical register. This is a purely local property, because all physical