[llvm-commits] CVS: reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Thu Apr 8 15:32:02 PDT 2004
Changes in directory reopt/lib/LightWtProfiling:
RuntimeOptimizations.cpp updated: 1.23 -> 1.24
---
Log message:
Add more comments.
Only print out machine code in DEBUG().
---
Diffs of the changes: (+12 -4)
Index: reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp
diff -u reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.23 reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.24
--- reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.23 Thu Mar 11 13:53:16 2004
+++ reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp Thu Apr 8 15:30:50 2004
@@ -71,15 +71,23 @@
// so that we do not get clobbered by the overhead of adding copies in
// UnpackTraceFunction.
FunctionPassManager PM (MP);
- PM.add (new PrintFunctionPass ("Function created from trace for "
+ DEBUG(PM.add (new PrintFunctionPass ("Function created from trace for "
+ T.getFunction ()->getName () + ":\n",
- &std::cerr));
+ &std::cerr)));
PM.add (createVerifierPass ());
Target->getJITInfo ()->addPassesToJITCompile (PM);
- PM.add (createMachineFunctionPrinterPass (&std::cerr, "Before unpacking:\n"));
+ DEBUG(PM.add (createMachineFunctionPrinterPass (&std::cerr, "Before unpacking:\n")));
PM.add (createUnpackTraceFunctionPass (Target, TF));
- PM.add (createMachineFunctionPrinterPass (&std::cerr, "After unpacking:\n"));
+ DEBUG(PM.add (createMachineFunctionPrinterPass (&std::cerr, "After unpacking:\n")));
+ Target->getJITInfo ()->addPassesToJITCompile (PM);
+ // FIXME: We need the JIT's MachineCodeEmitter
+ // Target->addPassesToEmitMachineCode (PM, MCE);
PM.run (*TF->TraceFn);
+
+ // Add a branch from the entry basic block of the trace in the MatrixFn to the
+ // entry basic block of the unpacked TraceFn. Future executions of the trace
+ // will proceed from the optimized version of the code.
+
}
} // end namespace llvm
More information about the llvm-commits
mailing list