LLVM API Documentation

llvm::Interpreter Class Reference

#include <Interpreter.h>

Inheritance diagram for llvm::Interpreter:

Inheritance graph
[legend]
Collaboration diagram for llvm::Interpreter:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Interpreter (ModuleProvider *M)
 ~Interpreter ()
void runAtExitHandlers ()
virtual GenericValue runFunction (Function *F, const std::vector< GenericValue > &ArgValues)
virtual void * recompileAndRelinkFunction (Function *F)
void freeMachineCodeForFunction (Function *F)
void callFunction (Function *F, const std::vector< GenericValue > &ArgVals)
void run ()
void visitReturnInst (ReturnInst &I)
void visitBranchInst (BranchInst &I)
void visitSwitchInst (SwitchInst &I)
void visitBinaryOperator (BinaryOperator &I)
void visitICmpInst (ICmpInst &I)
void visitFCmpInst (FCmpInst &I)
void visitAllocationInst (AllocationInst &I)
void visitFreeInst (FreeInst &I)
void visitLoadInst (LoadInst &I)
void visitStoreInst (StoreInst &I)
void visitGetElementPtrInst (GetElementPtrInst &I)
void visitPHINode (PHINode &PN)
void visitTruncInst (TruncInst &I)
void visitZExtInst (ZExtInst &I)
void visitSExtInst (SExtInst &I)
void visitFPTruncInst (FPTruncInst &I)
void visitFPExtInst (FPExtInst &I)
void visitUIToFPInst (UIToFPInst &I)
void visitSIToFPInst (SIToFPInst &I)
void visitFPToUIInst (FPToUIInst &I)
void visitFPToSIInst (FPToSIInst &I)
void visitPtrToIntInst (PtrToIntInst &I)
void visitIntToPtrInst (IntToPtrInst &I)
void visitBitCastInst (BitCastInst &I)
void visitSelectInst (SelectInst &I)
void visitCallSite (CallSite CS)
void visitCallInst (CallInst &I)
void visitInvokeInst (InvokeInst &I)
void visitUnwindInst (UnwindInst &I)
void visitUnreachableInst (UnreachableInst &I)
void visitShl (BinaryOperator &I)
void visitLShr (BinaryOperator &I)
void visitAShr (BinaryOperator &I)
void visitVAArgInst (VAArgInst &I)
void visitInstruction (Instruction &I)
GenericValue callExternalFunction (Function *F, const std::vector< GenericValue > &ArgVals)
void exitCalled (GenericValue GV)
void addAtExitHandler (Function *F)
GenericValuegetFirstVarArg ()
GenericValue executeGEPOperation (Value *Ptr, gep_type_iterator I, gep_type_iterator E, ExecutionContext &SF)

Static Public Member Functions

static void Register ()
static ExecutionEnginecreate (ModuleProvider *M, std::string *ErrorStr=0, bool Fast=0)


Detailed Description

Definition at line 82 of file lib/ExecutionEngine/Interpreter/Interpreter.h.


Constructor & Destructor Documentation

Interpreter::Interpreter ( ModuleProvider M  )  [explicit]

Interpreter::~Interpreter (  ) 

Definition at line 65 of file Interpreter.cpp.


Member Function Documentation

void Interpreter::runAtExitHandlers (  ) 

runAtExitHandlers - Run any functions registered by the program's calls to atexit(3), which we intercept and store in AtExitHandlers.

Definition at line 69 of file Interpreter.cpp.

References callFunction(), and run().

Referenced by exitCalled().

static void llvm::Interpreter::Register (  )  [inline, static]

ExecutionEngine * Interpreter::create ( ModuleProvider MP,
std::string *  ErrStr = 0,
bool  Fast = 0 
) [static]

create - Create an interpreter ExecutionEngine. This can never fail.

create - Create a new interpreter object. This can never fail.

Definition at line 39 of file Interpreter.cpp.

References Interpreter(), and llvm::ModuleProvider::materializeModule().

Referenced by Register().

GenericValue Interpreter::runFunction ( Function F,
const std::vector< GenericValue > &  ArgValues 
) [virtual]

run - Start execution with the specified function and arguments.

Implements llvm::ExecutionEngine.

Definition at line 80 of file Interpreter.cpp.

References callFunction(), llvm::Function::getFunctionType(), llvm::FunctionType::getNumParams(), and run().

virtual void* llvm::Interpreter::recompileAndRelinkFunction ( Function F  )  [inline, virtual]

recompileAndRelinkFunction - For the interpreter, functions are always up-to-date.

Implements llvm::ExecutionEngine.

Definition at line 121 of file lib/ExecutionEngine/Interpreter/Interpreter.h.

void llvm::Interpreter::freeMachineCodeForFunction ( Function F  )  [inline, virtual]

freeMachineCodeForFunction - The interpreter does not generate any code.

Implements llvm::ExecutionEngine.

Definition at line 127 of file lib/ExecutionEngine/Interpreter/Interpreter.h.

void Interpreter::callFunction ( Function F,
const std::vector< GenericValue > &  ArgVals 
)

void Interpreter::run (  ) 

void Interpreter::visitReturnInst ( ReturnInst I  ) 

void Interpreter::visitBranchInst ( BranchInst I  ) 

void Interpreter::visitSwitchInst ( SwitchInst I  ) 

void Interpreter::visitBinaryOperator ( BinaryOperator I  ) 

void Interpreter::visitICmpInst ( ICmpInst I  ) 

void Interpreter::visitFCmpInst ( FCmpInst I  ) 

void Interpreter::visitAllocationInst ( AllocationInst I  ) 

void Interpreter::visitFreeInst ( FreeInst I  ) 

Definition at line 773 of file Execution.cpp.

References llvm::User::getOperand(), llvm::Value::getType(), and llvm::GVTOP().

void Interpreter::visitLoadInst ( LoadInst I  ) 

void Interpreter::visitStoreInst ( StoreInst I  ) 

void Interpreter::visitGetElementPtrInst ( GetElementPtrInst I  ) 

void llvm::Interpreter::visitPHINode ( PHINode PN  )  [inline]

void Interpreter::visitTruncInst ( TruncInst I  ) 

Definition at line 1108 of file Execution.cpp.

References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().

void Interpreter::visitZExtInst ( ZExtInst I  ) 

Definition at line 1118 of file Execution.cpp.

References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().

void Interpreter::visitSExtInst ( SExtInst I  ) 

Definition at line 1113 of file Execution.cpp.

References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().

void Interpreter::visitFPTruncInst ( FPTruncInst I  ) 

Definition at line 1123 of file Execution.cpp.

References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().

void Interpreter::visitFPExtInst ( FPExtInst I  ) 

Definition at line 1128 of file Execution.cpp.

References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().

void Interpreter::visitUIToFPInst ( UIToFPInst I  ) 

Definition at line 1133 of file Execution.cpp.

References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().

void Interpreter::visitSIToFPInst ( SIToFPInst I  ) 

Definition at line 1138 of file Execution.cpp.

References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().

void Interpreter::visitFPToUIInst ( FPToUIInst I  ) 

Definition at line 1143 of file Execution.cpp.

References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().

void Interpreter::visitFPToSIInst ( FPToSIInst I  ) 

Definition at line 1148 of file Execution.cpp.

References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().

void Interpreter::visitPtrToIntInst ( PtrToIntInst I  ) 

Definition at line 1153 of file Execution.cpp.

References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().

void Interpreter::visitIntToPtrInst ( IntToPtrInst I  ) 

Definition at line 1158 of file Execution.cpp.

References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().

void Interpreter::visitBitCastInst ( BitCastInst I  ) 

Definition at line 1163 of file Execution.cpp.

References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().

void Interpreter::visitSelectInst ( SelectInst I  ) 

Definition at line 578 of file Execution.cpp.

References executeSelectInst(), llvm::User::getOperand(), R, and SetValue().

void Interpreter::visitCallSite ( CallSite  CS  ) 

void llvm::Interpreter::visitCallInst ( CallInst I  )  [inline]

Definition at line 164 of file lib/ExecutionEngine/Interpreter/Interpreter.h.

References visitCallSite().

void llvm::Interpreter::visitInvokeInst ( InvokeInst I  )  [inline]

Definition at line 165 of file lib/ExecutionEngine/Interpreter/Interpreter.h.

References visitCallSite().

void Interpreter::visitUnwindInst ( UnwindInst I  ) 

Definition at line 648 of file Execution.cpp.

References llvm::ExecutionContext::Caller, and Inst.

void Interpreter::visitUnreachableInst ( UnreachableInst I  ) 

Definition at line 666 of file Execution.cpp.

References llvm::cerr().

void Interpreter::visitShl ( BinaryOperator I  ) 

void Interpreter::visitLShr ( BinaryOperator I  ) 

void Interpreter::visitAShr ( BinaryOperator I  ) 

void Interpreter::visitVAArgInst ( VAArgInst I  ) 

void llvm::Interpreter::visitInstruction ( Instruction I  )  [inline]

Definition at line 174 of file lib/ExecutionEngine/Interpreter/Interpreter.h.

References llvm::cerr().

GenericValue Interpreter::callExternalFunction ( Function F,
const std::vector< GenericValue > &  ArgVals 
)

void Interpreter::exitCalled ( GenericValue  GV  ) 

void llvm::Interpreter::addAtExitHandler ( Function F  )  [inline]

Definition at line 183 of file lib/ExecutionEngine/Interpreter/Interpreter.h.

Referenced by lle_X_atexit().

GenericValue* llvm::Interpreter::getFirstVarArg (  )  [inline]

GenericValue Interpreter::executeGEPOperation ( Value Ptr,
gep_type_iterator  I,
gep_type_iterator  E,
ExecutionContext SF 
)


The documentation for this class was generated from the following files:



This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.