[llvm-commits] CVS: reopt/lib/LightWtProfiling/Initialization.cpp RuntimeOptimizations.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Thu Oct 7 10:00:24 PDT 2004



Changes in directory reopt/lib/LightWtProfiling:

Initialization.cpp updated: 1.21 -> 1.22
RuntimeOptimizations.cpp updated: 1.53 -> 1.54
---
Log message:

Support skipping more than one trace.


---
Diffs of the changes:  (+7 -8)

Index: reopt/lib/LightWtProfiling/Initialization.cpp
diff -u reopt/lib/LightWtProfiling/Initialization.cpp:1.21 reopt/lib/LightWtProfiling/Initialization.cpp:1.22
--- reopt/lib/LightWtProfiling/Initialization.cpp:1.21	Mon Oct  4 16:18:24 2004
+++ reopt/lib/LightWtProfiling/Initialization.cpp	Thu Oct  7 12:00:11 2004
@@ -41,7 +41,6 @@
 bool enable_trace_optimizer;
 bool enable_phase_detect;
 ModuleProvider *MP;
-std::set<int> skipTrace;
 
 // Command line options. Use these to set the global variables.  For
 // now the reoptimizer code references the global variables
@@ -68,9 +67,6 @@
 cl::opt<bool, true>
  EnableTraceOpt("enable-trace-opt", cl::location(enable_trace_optimizer),
  cl::desc("Use the new trace optimizer instead of the old trace layout engine"));
-cl::opt<int>
- SkipTraceOpt("skip-trace", cl::init(-1),
- cl::desc("Don't optimize the Nth trace, when using trace optimizer"));
 cl::opt<bool, true>
  EnablePhaseDetect("enable-phase-detect", cl::location(enable_phase_detect),
  cl::desc("Use a timer interrupt to remove traces periodically from the trace cache"));
@@ -102,8 +98,6 @@
     initialize_timer ();
   }
 
-  if (SkipTraceOpt != -1) { skipTrace.insert((int)SkipTraceOpt); }
-  
   return argc;
 }
 


Index: reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp
diff -u reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.53 reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.54
--- reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.53	Tue Oct  5 10:48:57 2004
+++ reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp	Thu Oct  7 12:00:12 2004
@@ -29,7 +29,11 @@
 extern bool SaveStateToModule;
 extern bool SaveRegAllocState;
 static int TraceCount = 0;
-extern std::set<int> skipTrace;
+
+cl::list<int>
+ SkipTrace("skip-trace", 
+ cl::CommaSeparated,
+ cl::desc("Don't optimize these trace numbers, when using trace optimizer"));
 
 extern "C" void TraceOptimizerDone (uint64_t a, uint64_t traceStartAddr,
                                     uint64_t traceEndAddr) {
@@ -84,7 +88,8 @@
     return false;
 
   DEBUG(++TraceCount;
-  if ((skipTrace.find (TraceCount) != skipTrace.end ())) {
+  if (std::find (SkipTrace.begin (), SkipTrace.end (), TraceCount)
+      != SkipTrace.end ()) {
     std::cerr << "optimizeTrace: skipping trace " << TraceCount << "\n";
     return false;
   });






More information about the llvm-commits mailing list