diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-08-04 21:44:13 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-08-04 21:44:13 +0000 |
commit | 2464d618c0043b8dcd13170f145f5add7738aad3 (patch) | |
tree | 69a11f0783e1b175596866b9529b185b0022c602 /lib | |
parent | 0e3a1a8f8fbe34d47c83d19c8b11a3bfdcacad00 (diff) | |
download | external_llvm-2464d618c0043b8dcd13170f145f5add7738aad3.zip external_llvm-2464d618c0043b8dcd13170f145f5add7738aad3.tar.gz external_llvm-2464d618c0043b8dcd13170f145f5add7738aad3.tar.bz2 |
The EH prepare passes really want to be the last passes run before code-gen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/LLVMTargetMachine.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp index 02d43b8..807ceef 100644 --- a/lib/CodeGen/LLVMTargetMachine.cpp +++ b/lib/CodeGen/LLVMTargetMachine.cpp @@ -272,6 +272,11 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM, PM.add(createPrintFunctionPass("\n\n*** Code after LSR ***\n", &dbgs())); } + PM.add(createGCLoweringPass()); + + // Make sure that no unreachable blocks are instruction selected. + PM.add(createUnreachableBlockEliminationPass()); + // Turn exception handling constructs into something the code generators can // handle. switch (getMCAsmInfo()->getExceptionHandlingType()) { @@ -293,11 +298,6 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM, break; } - PM.add(createGCLoweringPass()); - - // Make sure that no unreachable blocks are instruction selected. - PM.add(createUnreachableBlockEliminationPass()); - if (OptLevel != CodeGenOpt::None && !DisableCGP) PM.add(createCodeGenPreparePass(getTargetLowering())); |