[llvm-commits] CVS: llvm/lib/Reoptimizer/LightWtProfiling/Trigger/Globals.h
Brian Gaeke
gaeke at niobe.cs.uiuc.edu
Tue Aug 12 22:08:25 PDT 2003
Changes in directory llvm/lib/Reoptimizer/LightWtProfiling/Trigger:
Globals.h added (r1.1)
---
Log message:
New file to gather all the scattered global variables the Reoptimizer uses.
---
Diffs of the changes:
Index: llvm/lib/Reoptimizer/LightWtProfiling/Trigger/Globals.h
diff -c /dev/null llvm/lib/Reoptimizer/LightWtProfiling/Trigger/Globals.h:1.1
*** /dev/null Tue Aug 12 22:07:57 2003
--- llvm/lib/Reoptimizer/LightWtProfiling/Trigger/Globals.h Tue Aug 12 22:06:17 2003
***************
*** 0 ****
--- 1,56 ----
+ //===- LightWtProfiling/Trigger/Globals.h - Reoptimizer Globals ---*- C++ -*-=//
+ //
+ // This file contains parameters and other global variables used by
+ // the reoptimizer. It is intended as a central place to gather
+ // together (and perhaps document) the global variables we use, until
+ // we actually get around to encapsulating the reoptimizer in its own
+ // class.
+ //
+ //===----------------------------------------------------------------------===//
+
+ #ifndef GLOBALS_H
+ #define GLOBALS_H
+
+ #include "llvm/Reoptimizer/TraceCache.h"
+ #include "llvm/Reoptimizer/VirtualMem.h"
+ #include "llvm/Module.h"
+
+ /// Threshold against which back-edge counters are compared in first-level
+ /// instrumentation. If a back-edge's counter exceeds this threshold, we
+ /// may generate second-level instrumentation (SLI) for the loop.
+ ///
+ extern int reopt_threshold;
+
+ /// Another threshold used in SecondTrigger.cpp.
+ ///
+ extern long THRESHOLD_LEVEL_2;
+
+ /// If a trace selected as "hot" is exited more than a certain number
+ /// of times, then it will be rejected; this certain number is set to
+ /// 1/3 of the THRESHOLD_LEVEL_2 value.
+ ///
+ extern long LEVEL_TWO_EXITS;
+
+ /// Second-level instrumented code cache.
+ ///
+ extern TraceCache *tr;
+
+ /// Final trace cache.
+ ///
+ extern TraceCache *tr2;
+
+ /// Interface by which code segment is read/written.
+ ///
+ extern VirtualMem *vm;
+
+ /// Module being reoptimized.
+ ///
+ extern Module *M;
+
+ /// The current SPARC LLC writes the bytecode and its length into the
+ /// executable. We can access them via these global symbols.
+ ///
+ extern const unsigned char LLVMBytecode[];
+ extern int llvm_length;
+
+ #endif // GLOBALS_H
More information about the llvm-commits
mailing list