diff options
author | Owen Anderson <resistor@mac.com> | 2008-05-30 18:38:26 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-05-30 18:38:26 +0000 |
commit | e785fb639c91f0995b797248c4e8e403c76d3b27 (patch) | |
tree | 8a237c053fb7385b1faaa72394f240b63bf12c79 /llvm/lib | |
parent | 66572afde48b08fc3c9cc2722ee8457e9ebc98e3 (diff) | |
download | bcm5719-llvm-e785fb639c91f0995b797248c4e8e403c76d3b27.tar.gz bcm5719-llvm-e785fb639c91f0995b797248c4e8e403c76d3b27.zip |
Preserve the register coallescer, and update live intervals more correctly by triggering a renumbering after phi elimination.
llvm-svn: 51780
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/StrongPHIElimination.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/StrongPHIElimination.cpp b/llvm/lib/CodeGen/StrongPHIElimination.cpp index 97e4fb9b6e7..449ef38a3a1 100644 --- a/llvm/lib/CodeGen/StrongPHIElimination.cpp +++ b/llvm/lib/CodeGen/StrongPHIElimination.cpp @@ -27,6 +27,7 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineLoopInfo.h" #include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/CodeGen/RegisterCoalescer.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/ADT/DepthFirstIterator.h" @@ -34,7 +35,6 @@ #include "llvm/Support/Compiler.h" using namespace llvm; - namespace { struct VISIBILITY_HIDDEN StrongPHIElimination : public MachineFunctionPass { static char ID; // Pass identification, replacement for typeid @@ -74,6 +74,7 @@ namespace { // TODO: Actually make this true. AU.addPreserved<LiveIntervals>(); + AU.addPreserved<RegisterCoalescer>(); MachineFunctionPass::getAnalysisUsage(AU); } @@ -921,5 +922,7 @@ bool StrongPHIElimination::runOnMachineFunction(MachineFunction &Fn) { PInstr->eraseFromParent(); } + LI.computeNumbering(); + return true; } |