- Fix SelectionDAG to generate correct CFGs.

- Add a basic machine-level dead block eliminator.

These two have to go together, since many other parts of the code generator are unable to handle the unreachable blocks otherwise created.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54333 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2008-08-04 23:54:43 +00:00
parent b42a626122
commit bd3ba461eb
7 changed files with 128 additions and 11 deletions

View File

@@ -247,10 +247,8 @@ public:
assert(Removed && "Register is not defined by this instruction!");
return true;
}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
}
void getAnalysisUsage(AnalysisUsage &AU) const;
virtual void releaseMemory() {
VirtRegInfo.clear();

View File

@@ -71,6 +71,10 @@ namespace llvm {
/// register allocators.
extern const PassInfo *const TwoAddressInstructionPassID;
/// UnreachableMachineBlockElimination pass - This pass removes unreachable
/// machine basic blocks.
extern const PassInfo *const UnreachableMachineBlockElimID;
/// Creates a register allocator as the user specified on the command line.
///
FunctionPass *createRegisterAllocator();