diff options
author | Dan Gohman <gohman@apple.com> | 2008-11-24 17:22:52 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-11-24 17:22:52 +0000 |
commit | cb72dd6776d49b21711977bde21b23c92cff7544 (patch) | |
tree | ba3cfdb8c74e04f2bbd7c9c7816ae17a5e03cc29 /lib | |
parent | f003276ee6c1eff64052456f64457cb82904b7bf (diff) | |
download | external_llvm-cb72dd6776d49b21711977bde21b23c92cff7544.zip external_llvm-cb72dd6776d49b21711977bde21b23c92cff7544.tar.gz external_llvm-cb72dd6776d49b21711977bde21b23c92cff7544.tar.bz2 |
Run post-RA scheduling after branch folding, as it tends to
obscure tail-merging opportunities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59967 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/LLVMTargetMachine.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp index e10be69..e687392 100644 --- a/lib/CodeGen/LLVMTargetMachine.cpp +++ b/lib/CodeGen/LLVMTargetMachine.cpp @@ -225,6 +225,13 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM, bool Fast) { if (PrintMachineCode) PM.add(createMachineFunctionPrinterPass(cerr)); + // Branch folding must be run after regalloc and prolog/epilog insertion. + if (!Fast) + PM.add(createBranchFoldingPass(getEnableTailMergeDefault())); + + if (PrintMachineCode) + PM.add(createMachineFunctionPrinterPass(cerr)); + // Second pass scheduler. if (!Fast && !DisablePostRAScheduler) { PM.add(createPostRAScheduler()); @@ -233,10 +240,6 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM, bool Fast) { PM.add(createMachineFunctionPrinterPass(cerr)); } - // Branch folding must be run after regalloc and prolog/epilog insertion. - if (!Fast) - PM.add(createBranchFoldingPass(getEnableTailMergeDefault())); - PM.add(createGCMachineCodeAnalysisPass()); if (PrintMachineCode) |