diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-01-05 00:26:49 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-01-05 00:26:49 +0000 |
| commit | d19d3cab090a66124d0bf69470a4575ae7792a56 (patch) | |
| tree | 5daa24188d5983d640a19473d2e310b1bfff78fd /llvm/lib/CodeGen/RegAllocFast.cpp | |
| parent | e6e9d8f6a7c686a58699a3b562db9c80ff864ef2 (diff) | |
| download | bcm5719-llvm-d19d3cab090a66124d0bf69470a4575ae7792a56.tar.gz bcm5719-llvm-d19d3cab090a66124d0bf69470a4575ae7792a56.zip | |
Freeze reserved registers before starting register allocation.
The register allocators don't currently support adding reserved
registers while they are running. Extend the MRI API to keep track of
the set of reserved registers when register allocation started.
Target hooks like hasFP() and needsStackRealignment() can look at this
set to avoid reserving more registers during register allocation.
llvm-svn: 147577
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocFast.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/RegAllocFast.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegAllocFast.cpp b/llvm/lib/CodeGen/RegAllocFast.cpp index c2656c5e5c8..93f39b6c661 100644 --- a/llvm/lib/CodeGen/RegAllocFast.cpp +++ b/llvm/lib/CodeGen/RegAllocFast.cpp @@ -1047,6 +1047,7 @@ bool RAFast::runOnMachineFunction(MachineFunction &Fn) { TM = &Fn.getTarget(); TRI = TM->getRegisterInfo(); TII = TM->getInstrInfo(); + MRI->freezeReservedRegs(Fn); RegClassInfo.runOnMachineFunction(Fn); UsedInInstr.resize(TRI->getNumRegs()); |

