[llvm-commits] CVS: llvm/tools/lli/Execution.cpp lli.cpp

Chris Lattner lattner at cs.uiuc.edu
Sat Dec 7 23:52:01 PST 2002


Changes in directory llvm/tools/lli:

Execution.cpp updated: 1.71 -> 1.72
lli.cpp updated: 1.12 -> 1.13

---
Log message:

Add support to count the number of dynamic instructions executed by LLI



---
Diffs of the changes:

Index: llvm/tools/lli/Execution.cpp
diff -u llvm/tools/lli/Execution.cpp:1.71 llvm/tools/lli/Execution.cpp:1.72
--- llvm/tools/lli/Execution.cpp:1.71	Thu Nov  7 13:29:31 2002
+++ llvm/tools/lli/Execution.cpp	Sat Dec  7 23:51:08 2002
@@ -15,6 +15,7 @@
 #include "llvm/Assembly/Writer.h"
 #include "llvm/Target/TargetData.h"
 #include "Support/CommandLine.h"
+#include "Support/Statistic.h"
 #include <math.h>  // For fmod
 #include <signal.h>
 #include <setjmp.h>
@@ -22,6 +23,10 @@
 using std::cout;
 using std::cerr;
 
+namespace {
+  Statistic<> NumDynamicInsts("lli", "Number of dynamic instructions executed");
+}
+
 static cl::opt<bool>
 QuietMode("quiet", cl::desc("Do not emit any non-program output"));
 
@@ -1250,6 +1255,9 @@
 
   if (Trace)
     CW << "Run:" << I;
+
+  // Track the number of dynamic instructions executed.
+  ++NumDynamicInsts;
 
   // Set a sigsetjmp buffer so that we can recover if an error happens during
   // instruction execution...


Index: llvm/tools/lli/lli.cpp
diff -u llvm/tools/lli/lli.cpp:1.12 llvm/tools/lli/lli.cpp:1.13
--- llvm/tools/lli/lli.cpp:1.12	Thu Jul 25 11:39:56 2002
+++ llvm/tools/lli/lli.cpp	Sat Dec  7 23:51:08 2002
@@ -21,10 +21,7 @@
               cl::value_desc("function name"));
 
 static cl::opt<bool>
-DebugMode("debug", cl::desc("Start program in debugger"));
-
-static cl::alias
-DebugModeA("d", cl::desc("Alias for -debug"), cl::aliasopt(DebugMode));
+DebugMode("d", cl::desc("Start program in debugger"));
 
 static cl::opt<bool>
 TraceMode("trace", cl::desc("Enable Tracing"));





More information about the llvm-commits mailing list