aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/SparcV9
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2004-05-28 19:33:59 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2004-05-28 19:33:59 +0000
commitb985158c35a103b681607361d05e61d8ebbcab41 (patch)
treeff6bb1a53dac56d19236b9bf65a16fbaba605200 /lib/Target/SparcV9
parentf4ad013a0e72866e747303911fc39fdd8bddd26a (diff)
downloadexternal_llvm-b985158c35a103b681607361d05e61d8ebbcab41.zip
external_llvm-b985158c35a103b681607361d05e61d8ebbcab41.tar.gz
external_llvm-b985158c35a103b681607361d05e61d8ebbcab41.tar.bz2
Make debugging output with -print-machineinstrs more useful: always print out
the transformed LLVM code which is the input to the instruction selector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13879 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9')
-rw-r--r--lib/Target/SparcV9/SparcV9TargetMachine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/SparcV9/SparcV9TargetMachine.cpp b/lib/Target/SparcV9/SparcV9TargetMachine.cpp
index 06efeb3..c088317 100644
--- a/lib/Target/SparcV9/SparcV9TargetMachine.cpp
+++ b/lib/Target/SparcV9/SparcV9TargetMachine.cpp
@@ -149,6 +149,11 @@ SparcV9TargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out
PM.add(createLICMPass());
PM.add(createGCSEPass());
+ // If the user's trying to read the generated code, they'll need to see the
+ // transformed input.
+ if (PrintMachineCode)
+ PM.add(new PrintModulePass());
+
// Construct and initialize the MachineFunction object for this fn.
PM.add(createMachineCodeConstructionPass(*this));