diff options
author | Chris Lattner <sabre@nondot.org> | 2004-07-02 05:46:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-07-02 05:46:41 +0000 |
commit | 9a9ca0f06bee3da8ef1f3874cccdfdf54ea2a74a (patch) | |
tree | 230199115a06a3e6d69b909018c163bbc4d97679 /lib/Target/X86/X86TargetMachine.cpp | |
parent | fc3c82a804c9b5eda24d96c21f7e6ff66bc2c529 (diff) |
Remove dead blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14564 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r-- | lib/Target/X86/X86TargetMachine.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index f1f003ba07..a2efb034f5 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -68,6 +68,9 @@ bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM, // FIXME: Implement the switch instruction in the instruction selector! PM.add(createLowerSwitchPass()); + // Make sure that no unreachable blocks are instruction selected. + PM.add(createUnreachableBlockEliminationPass()); + if (NoPatternISel && NoSimpleISel) PM.add(createX86SimpleInstructionSelector(*this)); else if (NoPatternISel) @@ -125,6 +128,9 @@ void X86JITInfo::addPassesToJITCompile(FunctionPassManager &PM) { // FIXME: Implement the switch instruction in the instruction selector! PM.add(createLowerSwitchPass()); + // Make sure that no unreachable blocks are instruction selected. + PM.add(createUnreachableBlockEliminationPass()); + if (NoPatternISel) PM.add(createX86SimpleInstructionSelector(TM)); else |