aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-11-20 19:54:21 +0000
committerDan Gohman <gohman@apple.com>2008-11-20 19:54:21 +0000
commita2fa48eadd44933a5f9f25a7cd5f850093b8de5a (patch)
treeedaba1356b962756dfe687499ee53244ba5a232b /lib/CodeGen/LLVMTargetMachine.cpp
parent1501bacb743499ce9c59afeb855638aff6076129 (diff)
downloadexternal_llvm-a2fa48eadd44933a5f9f25a7cd5f850093b8de5a.zip
external_llvm-a2fa48eadd44933a5f9f25a7cd5f850093b8de5a.tar.gz
external_llvm-a2fa48eadd44933a5f9f25a7cd5f850093b8de5a.tar.bz2
Add another machine-code printing pass when post-pass scheduling is run.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59746 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--lib/CodeGen/LLVMTargetMachine.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp
index 2397a16..e10be69 100644
--- a/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/lib/CodeGen/LLVMTargetMachine.cpp
@@ -226,9 +226,13 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM, bool Fast) {
PM.add(createMachineFunctionPrinterPass(cerr));
// Second pass scheduler.
- if (!Fast && !DisablePostRAScheduler)
+ if (!Fast && !DisablePostRAScheduler) {
PM.add(createPostRAScheduler());
+ if (PrintMachineCode)
+ PM.add(createMachineFunctionPrinterPass(cerr));
+ }
+
// Branch folding must be run after regalloc and prolog/epilog insertion.
if (!Fast)
PM.add(createBranchFoldingPass(getEnableTailMergeDefault()));