diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2004-05-28 19:33:59 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2004-05-28 19:33:59 +0000 |
commit | 26925ff857af048a24d9846e2a0a0c03b5449216 (patch) | |
tree | 1c93c090452248ea115244c25821aa96cc8f9db8 /llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp | |
parent | 3709627b7dd21bb541cb7144bf4203357cfbeb75 (diff) | |
download | bcm5719-llvm-26925ff857af048a24d9846e2a0a0c03b5449216.tar.gz bcm5719-llvm-26925ff857af048a24d9846e2a0a0c03b5449216.zip |
Make debugging output with -print-machineinstrs more useful: always print out
the transformed LLVM code which is the input to the instruction selector.
llvm-svn: 13879
Diffstat (limited to 'llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp b/llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp index 06efeb31e25..c088317cbda 100644 --- a/llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp +++ b/llvm/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)); |