[llvm-commits] CVS: llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Mon Jun 14 00:07:15 PDT 2004
Changes in directory llvm/lib/Target/SparcV9:
SparcV9TargetMachine.cpp updated: 1.113 -> 1.114
---
Log message:
Make -print-machineinstrs even stronger. You get to see the final code after
peepholing, and make it work the same way in the JIT as in LLC.
---
Diffs of the changes: (+11 -0)
Index: llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp
diff -u llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp:1.113 llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp:1.114
--- llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp:1.113 Thu Jun 3 00:03:01 2004
+++ llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp Mon Jun 14 00:05:45 2004
@@ -179,6 +179,9 @@
if (!DisablePeephole)
PM.add(createPeepholeOptsPass(*this));
+ if (PrintMachineCode)
+ PM.add(createMachineFunctionPrinterPass(&std::cerr, "Final code:\n"));
+
if (EmitMappingInfo) {
PM.add(createInternalGlobalMapperPass());
PM.add(getMappingInfoAsmPrinterPass(Out));
@@ -234,6 +237,11 @@
//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 PrintFunctionPass());
+
// Construct and initialize the MachineFunction object for this fn.
PM.add(createMachineCodeConstructionPass(TM));
@@ -251,6 +259,9 @@
if (!DisablePeephole)
PM.add(createPeepholeOptsPass(TM));
+
+ if (PrintMachineCode)
+ PM.add(createMachineFunctionPrinterPass(&std::cerr, "Final code:\n"));
}
/// allocateSparcV9TargetMachine - Allocate and return a subclass of TargetMachine
More information about the llvm-commits
mailing list