[llvm-commits] CVS: reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Tue Oct 12 13:22:17 PDT 2004
Changes in directory reopt/lib/LightWtProfiling:
RuntimeOptimizations.cpp updated: 1.54 -> 1.55
---
Log message:
Add bug-isolation options: -disable-ttf, -disable-utf, and
-disable-branch-stitch.
---
Diffs of the changes: (+20 -0)
Index: reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp
diff -u reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.54 reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.55
--- reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.54 Thu Oct 7 12:00:12 2004
+++ reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp Tue Oct 12 15:22:06 2004
@@ -35,6 +35,20 @@
cl::CommaSeparated,
cl::desc("Don't optimize these trace numbers, when using trace optimizer"));
+// Bug-isolation mechanisms
+cl::opt<bool>
+ DisableTTF("disable-ttf",
+ cl::init(false),
+ cl::desc("Disable TraceToFunction, UnpackTraceFunction and branch stitching in trace opt."));
+cl::opt<bool>
+ DisableUTF("disable-utf",
+ cl::init(false),
+ cl::desc("Disable UnpackTraceFunction and branch stitching in trace opt."));
+cl::opt<bool>
+ DisableBranchStitching("disable-branch-stitch",
+ cl::init(false),
+ cl::desc("Disable branch stitching in trace opt."));
+
extern "C" void TraceOptimizerDone (uint64_t a, uint64_t traceStartAddr,
uint64_t traceEndAddr) {
DEBUG (std::cerr << "\n*** About to return from optimizeTrace() for trace #"
@@ -87,6 +101,8 @@
if (TraceContainsCall (T))
return false;
+ DEBUG(if (DisableTTF) return false);
+
DEBUG(++TraceCount;
if (std::find (SkipTrace.begin (), SkipTrace.end (), TraceCount)
!= SkipTrace.end ()) {
@@ -110,11 +126,15 @@
DEBUG (WriteTraceToFile (&T));
TraceFunction *TF = BuildTraceFunction (T, MP);
+ DEBUG(if (DisableUTF) return false);
+
// Compile the TraceFunction to machine code using the optimizing trace JIT
// compiler, and unpack the resulting optimized trace back into its matrix
// function.
uint64_t traceStartAddr = TJIT->compileTraceFunction (TF);
+ DEBUG(if (DisableBranchStitching) return false);
+
// Add a branch from address A (the parameter to this method) to the
// entry basic block of the unpacked TraceFn. Future executions of the trace
// will proceed from the optimized version of the code.
More information about the llvm-commits
mailing list