[llvm-commits] CVS: llvm/lib/Reoptimizer/LightWtProfiling/Trigger/FirstTrigger.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Nov 3 13:28:01 PST 2002
Changes in directory llvm/lib/Reoptimizer/LightWtProfiling/Trigger:
FirstTrigger.cpp updated: 1.2 -> 1.3
---
Log message:
Hack to make build work successfully on x86
---
Diffs of the changes:
Index: llvm/lib/Reoptimizer/LightWtProfiling/Trigger/FirstTrigger.cpp
diff -u llvm/lib/Reoptimizer/LightWtProfiling/Trigger/FirstTrigger.cpp:1.2 llvm/lib/Reoptimizer/LightWtProfiling/Trigger/FirstTrigger.cpp:1.3
--- llvm/lib/Reoptimizer/LightWtProfiling/Trigger/FirstTrigger.cpp:1.2 Sun Nov 3 13:24:28 2002
+++ llvm/lib/Reoptimizer/LightWtProfiling/Trigger/FirstTrigger.cpp Sun Nov 3 13:27:17 2002
@@ -11,7 +11,7 @@
#include "llvm/Reoptimizer/InstrUtils.h"
#include <stdlib.h>
#include <sys/time.h>
-//#include <iostream>
+#include <iostream>
#include <fstream>
int reopt_threshold;
@@ -22,14 +22,14 @@
static struct timeval llvm_trigger_time;
extern "C" void llvm_time_start(){
- gettimeofday(&llvm_trace_time, (void *)0);
+ gettimeofday(&llvm_trace_time, 0);
}
extern "C" void llvm_time_end(){
static std::ofstream f_out("llvm_last_run");
struct timeval time_end;
- gettimeofday(&time_end, (void *)0);
+ gettimeofday(&time_end, 0);
long time = (time_end.tv_sec - llvm_trace_time.tv_sec)*1000000 +
(time_end.tv_usec - llvm_trace_time.tv_usec);
@@ -38,14 +38,14 @@
}
void llvm_trigger_time_start(){
- gettimeofday(&llvm_trigger_time, (void *)0);
+ gettimeofday(&llvm_trigger_time, 0);
}
void llvm_trigger_time_end(){
static std::ofstream f_out("llvm_trigger_last_run");
struct timeval time_end;
- gettimeofday(&time_end, (void *)0);
+ gettimeofday(&time_end, 0);
long time = (time_end.tv_sec - llvm_trigger_time.tv_sec)*1000000 +
(time_end.tv_usec - llvm_trigger_time.tv_usec);
@@ -78,7 +78,9 @@
std::cerr<<"Count = "<<*cnt<<"\n";
+#if 0 // FIXME: This breaks x86 build
asm("add %%i7, %1, %0":"=r"(brAddr):"i" (0));
+#endif
unsigned int brInst = vm->readInstrFrmVm(brAddr+8);
assert(isBranchInstr(brInst) && "Not a branch!");
More information about the llvm-commits
mailing list