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
This commit is contained in:
Owen Anderson 2008-05-30 18:38:26 +00:00
parent 427de86ada
commit 3947e4d142

View File

@ -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;
}