[llvm-commits] CVS: llvm/lib/Reoptimizer/LightWtProfiling/Trigger/Initialization.cpp
Brian Gaeke
gaeke at niobe.cs.uiuc.edu
Wed Aug 20 15:39:18 PDT 2003
Changes in directory llvm/lib/Reoptimizer/LightWtProfiling/Trigger:
Initialization.cpp updated: 1.4 -> 1.5
---
Log message:
Get rid of USE_CL_EXTERNAL_OPTS now that we've found the bug: cl::location
must always come before cl::init.
Make the "program name" and environment variable shorter, to match the
testing framework.
---
Diffs of the changes:
Index: llvm/lib/Reoptimizer/LightWtProfiling/Trigger/Initialization.cpp
diff -u llvm/lib/Reoptimizer/LightWtProfiling/Trigger/Initialization.cpp:1.4 llvm/lib/Reoptimizer/LightWtProfiling/Trigger/Initialization.cpp:1.5
--- llvm/lib/Reoptimizer/LightWtProfiling/Trigger/Initialization.cpp:1.4 Tue Aug 19 14:18:31 2003
+++ llvm/lib/Reoptimizer/LightWtProfiling/Trigger/Initialization.cpp Wed Aug 20 15:38:21 2003
@@ -25,8 +25,6 @@
Module *M;
bool count_trace_cycles;
-#define USE_CL_EXTERNAL_OPTS 0
-
// Command line options. Use these to set the global variables. For
// now the reoptimizer code references the global variables
// explicitly. When the reoptimizer is encapsulated into an object,
@@ -35,36 +33,23 @@
// FIXME: What are the units of these next two?
// Size of trace cache used for SLI-instrumented code
-cl::opt<int32_t>
-InstTraceCacheSize("inst-trace-cache-size",
- cl::init(30000));
-
+cl::opt<int32_t> InstTraceCacheSize("inst-trace-cache-size", cl::init(30000));
// Size of trace cache used for optimized code
-cl::opt<int32_t>
-OptTraceCacheSize("opt-trace-cache-size",
- cl::init(30000));
-
-#if USE_CL_EXTERNAL_OPTS
+cl::opt<int32_t> OptTraceCacheSize("opt-trace-cache-size", cl::init(30000));
cl::opt<int32_t, true>
-FLIThreshold("fli-threshold", cl::init(DEFAULT_THRESHOLD_LEVEL_1),
- cl::location(reopt_threshold));
-
+FLIThreshold("fli-threshold", cl::location(reopt_threshold), cl::init(30));
cl::opt<int32_t, true>
-SLIThreshold("sli-threshold", cl::init(DEFAULT_THRESHOLD_LEVEL_2),
- cl::location(THRESHOLD_LEVEL_2));
-
+SLIThreshold("sli-threshold", cl::location(THRESHOLD_LEVEL_2), cl::init(50));
cl::opt<bool, true>
-CountTraceCycles("count-trace-cycles", cl::init(false),
- cl::location(count_trace_cycles));
-#endif
-
+CountTraceCycles("count-trace-cycles", cl::location(count_trace_cycles));
+
/// reoptimizerInitialize - Initialization method for the
/// reoptimizer. A call to this function from main() is inserted by
/// the opt -instloops pass
/// (Transforms/Instrumentation/ProfilePaths/InstLoops.cpp).
///
extern "C" void reoptimizerInitialize(){
- cl::ParseEnvironmentOptions ("reoptimizer", "LLVM_REOPTIMIZER",
+ cl::ParseEnvironmentOptions ("reopt", "LLVM_REOPT",
" llvm dynamic optimizer");
vm = new VirtualMem();
tr = new TraceCache(InstTraceCacheSize, vm);
@@ -74,11 +59,6 @@
// FIXME: When do we need to call this?
//initialize_timer();
-#if !USE_CL_EXTERNAL_OPTS
- reopt_threshold = DEFAULT_THRESHOLD_LEVEL_1;
- THRESHOLD_LEVEL_2 = DEFAULT_THRESHOLD_LEVEL_2;
- count_trace_cycles = false;
-#endif
}
/// Initialization method for the reoptimizer that parses the bytecode
More information about the llvm-commits
mailing list