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 | 11e4be3717231a93dbbb203179dded1640e9e6de (patch) | |
tree | 8d928e53de84c70d77299fd720936f10da3e672e /llvm/lib/CodeGen | |
parent | 8ef449828f94a02478852a1a4d81aa4dff477d9d (diff) | |
download | bcm5719-llvm-11e4be3717231a93dbbb203179dded1640e9e6de.tar.gz bcm5719-llvm-11e4be3717231a93dbbb203179dded1640e9e6de.zip |
Run post-RA scheduling after branch folding, as it tends to
obscure tail-merging opportunities.
llvm-svn: 59967
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/LLVMTargetMachine.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp index e10be696142..e6873923bcc 100644 --- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp +++ b/llvm/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) |