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 | 3947e4d142c8a3fd958e62ace0a1333fb9e5a220 (patch) | |
tree | 279495701e5652f073375edd0ec89e0de40c810b | |
parent | 427de86ada3b59d6bf8f4957db04b3f3b58fc277 (diff) |
Preserve the register coallescer, and update live intervals more correctly by triggering a renumbering after phi elimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51780 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/StrongPHIElimination.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/StrongPHIElimination.cpp b/lib/CodeGen/StrongPHIElimination.cpp index 97e4fb9b6e..449ef38a3a 100644 --- a/lib/CodeGen/StrongPHIElimination.cpp +++ b/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; } |