LLVM API Documentation

Public Member Functions | Static Public Member Functions
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 (std::unique_ptr< Module > M)
 ~Interpreter ()
void runAtExitHandlers ()
GenericValue runFunction (Function *F, const std::vector< GenericValue > &ArgValues) override
void * getPointerToNamedFunction (StringRef Name, bool AbortOnFailure=true) override
void callFunction (Function *F, const std::vector< GenericValue > &ArgVals)
void run ()
void visitReturnInst (ReturnInst &I)
void visitBranchInst (BranchInst &I)
void visitSwitchInst (SwitchInst &I)
void visitIndirectBrInst (IndirectBrInst &I)
void visitBinaryOperator (BinaryOperator &I)
void visitICmpInst (ICmpInst &I)
void visitFCmpInst (FCmpInst &I)
void visitAllocaInst (AllocaInst &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 visitUnreachableInst (UnreachableInst &I)
void visitShl (BinaryOperator &I)
void visitLShr (BinaryOperator &I)
void visitAShr (BinaryOperator &I)
void visitVAArgInst (VAArgInst &I)
void visitExtractElementInst (ExtractElementInst &I)
void visitInsertElementInst (InsertElementInst &I)
void visitShuffleVectorInst (ShuffleVectorInst &I)
void visitExtractValueInst (ExtractValueInst &I)
void visitInsertValueInst (InsertValueInst &I)
void visitInstruction (Instruction &I)
GenericValue callExternalFunction (Function *F, const std::vector< GenericValue > &ArgVals)
void exitCalled (GenericValue GV)
void addAtExitHandler (Function *F)
GenericValuegetFirstVarArg ()

Static Public Member Functions

static void Register ()
static ExecutionEnginecreate (std::unique_ptr< Module > M, std::string *ErrorStr=nullptr)

Detailed Description

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


Constructor & Destructor Documentation

Interpreter::Interpreter ( std::unique_ptr< Module M) [explicit]

Definition at line 64 of file Interpreter.cpp.


Member Function Documentation

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

Referenced by lle_X_atexit().

void Interpreter::callFunction ( Function F,
const std::vector< GenericValue > &  ArgVals 
)
ExecutionEngine * Interpreter::create ( std::unique_ptr< Module M,
std::string *  ErrStr = nullptr 
) [static]

Create an interpreter ExecutionEngine.

Create a new interpreter object.

Definition at line 35 of file Interpreter.cpp.

References Interpreter().

Referenced by Register().

void* llvm::Interpreter::getPointerToNamedFunction ( StringRef  Name,
bool  AbortOnFailure = true 
) [inline, override, virtual]

getPointerToNamedFunction - This method returns the address of the specified function by using the dlsym function call. As such it is only useful for resolving library symbols, not code generated symbols.

If AbortOnFailure is false and no function with the given name is found, this function silently returns a null pointer. Otherwise, it prints a message to stderr and aborts.

This function is deprecated for the MCJIT execution engine.

Implements llvm::ExecutionEngine.

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

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

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

Definition at line 68 of file Interpreter.cpp.

References callFunction(), and run().

Referenced by exitCalled().

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

run - Start execution with the specified function and arguments.

Implements llvm::ExecutionEngine.

Definition at line 79 of file Interpreter.cpp.

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

Reimplemented from llvm::InstVisitor< Interpreter >.

Definition at line 1709 of file Execution.cpp.

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

Reimplemented from llvm::InstVisitor< Interpreter >.

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

References visitCallSite().

Reimplemented from llvm::InstVisitor< Interpreter >.

Definition at line 1674 of file Execution.cpp.

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

Reimplemented from llvm::InstVisitor< Interpreter >.

Definition at line 1694 of file Execution.cpp.

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

Reimplemented from llvm::InstVisitor< Interpreter >.

Definition at line 1689 of file Execution.cpp.

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

Reimplemented from llvm::InstVisitor< Interpreter >.

Definition at line 1669 of file Execution.cpp.

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

Reimplemented from llvm::InstVisitor< Interpreter >.

Definition at line 912 of file Execution.cpp.

References llvm::IndirectBrInst::getAddress(), and llvm::GVTOP().

Reimplemented from llvm::InstVisitor< Interpreter >.

Definition at line 1704 of file Execution.cpp.

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

Reimplemented from llvm::InstVisitor< Interpreter >.

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

References visitCallSite().

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

Reimplemented from llvm::InstVisitor< Interpreter >.

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

References llvm_unreachable.

Reimplemented from llvm::InstVisitor< Interpreter >.

Definition at line 1699 of file Execution.cpp.

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

Reimplemented from llvm::InstVisitor< Interpreter >.

Definition at line 1659 of file Execution.cpp.

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

Reimplemented from llvm::InstVisitor< Interpreter >.

Definition at line 1684 of file Execution.cpp.

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

Reimplemented from llvm::InstVisitor< Interpreter >.

Definition at line 1654 of file Execution.cpp.

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

Reimplemented from llvm::InstVisitor< Interpreter >.

Definition at line 1679 of file Execution.cpp.

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

Reimplemented from llvm::InstVisitor< Interpreter >.

Definition at line 876 of file Execution.cpp.

References llvm::report_fatal_error().

Reimplemented from llvm::InstVisitor< Interpreter >.

Definition at line 1664 of file Execution.cpp.

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


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