LLVM API Documentation

llvm::Interpreter Class Reference

#include <Interpreter.h>

Inheritance diagram for llvm::Interpreter:
[legend]
Collaboration diagram for llvm::Interpreter:
[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)
GenericValue * getFirstVarArg ()
GenericValue executeGEPOperation (Value *Ptr, gep_type_iterator I, gep_type_iterator E, ExecutionContext &SF)

Static Public Member Functions

static void Register ()
static ExecutionEngine * create (ModuleProvider *M, std::string *ErrorStr=0)


Detailed Description

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


Constructor & Destructor Documentation

Interpreter::Interpreter ( ModuleProvider *  M  )  [explicit]

Interpreter::~Interpreter (  ) 

Definition at line 61 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 65 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 
) [static]

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

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

Definition at line 36 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 76 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 753 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]

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

References llvm_unreachable.

void Interpreter::visitTruncInst ( TruncInst &  I  ) 

Definition at line 1102 of file Execution.cpp.

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

void Interpreter::visitZExtInst ( ZExtInst &  I  ) 

Definition at line 1112 of file Execution.cpp.

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

void Interpreter::visitSExtInst ( SExtInst &  I  ) 

Definition at line 1107 of file Execution.cpp.

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

void Interpreter::visitFPTruncInst ( FPTruncInst &  I  ) 

Definition at line 1117 of file Execution.cpp.

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

void Interpreter::visitFPExtInst ( FPExtInst &  I  ) 

Definition at line 1122 of file Execution.cpp.

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

void Interpreter::visitUIToFPInst ( UIToFPInst &  I  ) 

Definition at line 1127 of file Execution.cpp.

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

void Interpreter::visitSIToFPInst ( SIToFPInst &  I  ) 

Definition at line 1132 of file Execution.cpp.

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

void Interpreter::visitFPToUIInst ( FPToUIInst &  I  ) 

Definition at line 1137 of file Execution.cpp.

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

void Interpreter::visitFPToSIInst ( FPToSIInst &  I  ) 

Definition at line 1142 of file Execution.cpp.

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

void Interpreter::visitPtrToIntInst ( PtrToIntInst &  I  ) 

Definition at line 1147 of file Execution.cpp.

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

void Interpreter::visitIntToPtrInst ( IntToPtrInst &  I  ) 

Definition at line 1152 of file Execution.cpp.

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

void Interpreter::visitBitCastInst ( BitCastInst &  I  ) 

Definition at line 1157 of file Execution.cpp.

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

void Interpreter::visitSelectInst ( SelectInst &  I  ) 

Definition at line 558 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 166 of file lib/ExecutionEngine/Interpreter/Interpreter.h.

References visitCallSite().

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

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

References visitCallSite().

void Interpreter::visitUnwindInst ( UnwindInst &  I  ) 

void Interpreter::visitUnreachableInst ( UnreachableInst &  I  ) 

Definition at line 647 of file Execution.cpp.

References llvm::llvm_report_error().

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]

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 185 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: