using namespace llvm;
STATISTIC(NumDynamicInsts, "Number of dynamic instructions executed");
-static Interpreter *TheEE = 0;
static cl::opt<bool> PrintVolatile("interpreter-print-volatile", cl::Hidden,
cl::desc("make the interpreter print every volatile load and store"));
SF.Values[V] = Val;
}
-void Interpreter::initializeExecutionEngine() {
- TheEE = this;
-}
-
//===----------------------------------------------------------------------===//
// Binary Instruction Implementations
//===----------------------------------------------------------------------===//
void Interpreter::visitGetElementPtrInst(GetElementPtrInst &I) {
ExecutionContext &SF = ECStack.back();
- SetValue(&I, TheEE->executeGEPOperation(I.getPointerOperand(),
+ SetValue(&I, executeGEPOperation(I.getPointerOperand(),
gep_type_begin(I), gep_type_end(I), SF), SF);
}
void *getPointerToFunction(Function *F) { return (void*)F; }
- void initializeExecutionEngine();
+ void initializeExecutionEngine() { }
void initializeExternalFunctions();
GenericValue getConstantExprValue(ConstantExpr *CE, ExecutionContext &SF);
GenericValue getOperandValue(Value *V, ExecutionContext &SF);