Fix potential problems with unreachable basic blocks.

Also, while noone's looking, add support for constant expressions.  Wait,
I said not to look!

llvm-svn: 14566
This commit is contained in:
Chris Lattner 2004-07-02 05:49:11 +00:00
parent 3594324248
commit 55256dbf9b
1 changed files with 10 additions and 0 deletions

View File

@ -56,6 +56,11 @@ bool SparcV8TargetMachine::addPassesToEmitAssembly(PassManager &PM,
// FIXME: implement the invoke/unwind instructions!
PM.add(createLowerInvokePass());
PM.add(createLowerConstantExpressionsPass());
// Make sure that no unreachable blocks are instruction selected.
PM.add(createUnreachableBlockEliminationPass());
PM.add(createSparcV8SimpleInstructionSelector(*this));
// Print machine instructions as they were initially generated.
@ -102,7 +107,12 @@ void SparcV8JITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
// FIXME: implement the invoke/unwind instructions!
PM.add(createLowerInvokePass());
PM.add(createLowerConstantExpressionsPass());
// Make sure that no unreachable blocks are instruction selected.
PM.add(createUnreachableBlockEliminationPass());
PM.add(createSparcV8SimpleInstructionSelector(TM));
// Print machine instructions as they were initially generated.