LLVM 20.0.0git
|
#include "ExecutionEngine/Interpreter/Interpreter.h"
Public Member Functions | |
Interpreter (std::unique_ptr< Module > M) | |
~Interpreter () override | |
void | runAtExitHandlers () |
runAtExitHandlers - Run any functions registered by the program's calls to atexit(3), which we intercept and store in AtExitHandlers. | |
GenericValue | runFunction (Function *F, ArrayRef< GenericValue > ArgValues) override |
run - Start execution with the specified function and arguments. | |
void * | getPointerToNamedFunction (StringRef Name, bool AbortOnFailure=true) override |
getPointerToNamedFunction - This method returns the address of the specified function by using the dlsym function call. | |
void | callFunction (Function *F, ArrayRef< GenericValue > ArgVals) |
void | run () |
void | visitReturnInst (ReturnInst &I) |
void | visitBranchInst (BranchInst &I) |
void | visitSwitchInst (SwitchInst &I) |
void | visitIndirectBrInst (IndirectBrInst &I) |
void | visitUnaryOperator (UnaryOperator &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 | visitVAStartInst (VAStartInst &I) |
void | visitVAEndInst (VAEndInst &I) |
void | visitVACopyInst (VACopyInst &I) |
void | visitIntrinsicInst (IntrinsicInst &I) |
void | visitCallBase (CallBase &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, ArrayRef< GenericValue > ArgVals) |
void | exitCalled (GenericValue GV) |
void | addAtExitHandler (Function *F) |
GenericValue * | getFirstVarArg () |
Public Member Functions inherited from llvm::ExecutionEngine | |
virtual | ~ExecutionEngine () |
virtual void | addModule (std::unique_ptr< Module > M) |
Add a Module to the list of modules that we can JIT from. | |
virtual void | addObjectFile (std::unique_ptr< object::ObjectFile > O) |
addObjectFile - Add an ObjectFile to the execution engine. | |
virtual void | addObjectFile (object::OwningBinary< object::ObjectFile > O) |
virtual void | addArchive (object::OwningBinary< object::Archive > A) |
addArchive - Add an Archive to the execution engine. | |
const DataLayout & | getDataLayout () const |
virtual bool | removeModule (Module *M) |
removeModule - Removes a Module from the list of modules, but does not free the module's memory. | |
virtual Function * | FindFunctionNamed (StringRef FnName) |
FindFunctionNamed - Search all of the active modules to find the function that defines FnName. | |
virtual GlobalVariable * | FindGlobalVariableNamed (StringRef Name, bool AllowInternal=false) |
FindGlobalVariableNamed - Search all of the active modules to find the global variable that defines Name. | |
virtual GenericValue | runFunction (Function *F, ArrayRef< GenericValue > ArgValues)=0 |
runFunction - Execute the specified function with the specified arguments, and return the result. | |
virtual void * | getPointerToNamedFunction (StringRef Name, bool AbortOnFailure=true)=0 |
getPointerToNamedFunction - This method returns the address of the specified function by using the dlsym function call. | |
virtual void | mapSectionAddress (const void *LocalAddress, uint64_t TargetAddress) |
mapSectionAddress - map a section to its target address space value. | |
virtual void | generateCodeForModule (Module *M) |
generateCodeForModule - Run code generation for the specified module and load it into memory. | |
virtual void | finalizeObject () |
finalizeObject - ensure the module is fully processed and is usable. | |
bool | hasError () const |
Returns true if an error has been recorded. | |
void | clearErrorMessage () |
Clear the error message. | |
const std::string & | getErrorMessage () const |
Returns the most recent error message. | |
virtual void | runStaticConstructorsDestructors (bool isDtors) |
runStaticConstructorsDestructors - This method is used to execute all of the static constructors or destructors for a program. | |
void | runStaticConstructorsDestructors (Module &module, bool isDtors) |
This method is used to execute all of the static constructors or destructors for a particular module. | |
int | runFunctionAsMain (Function *Fn, const std::vector< std::string > &argv, const char *const *envp) |
runFunctionAsMain - This is a helper function which wraps runFunction to handle the common task of starting up main with the specified argc, argv, and envp parameters. | |
void | addGlobalMapping (const GlobalValue *GV, void *Addr) |
addGlobalMapping - Tell the execution engine that the specified global is at the specified location. | |
void | addGlobalMapping (StringRef Name, uint64_t Addr) |
void | clearAllGlobalMappings () |
clearAllGlobalMappings - Clear all global mappings and start over again, for use in dynamic compilation scenarios to move globals. | |
void | clearGlobalMappingsFromModule (Module *M) |
clearGlobalMappingsFromModule - Clear all global mappings that came from a particular module, because it has been removed from the JIT. | |
uint64_t | updateGlobalMapping (const GlobalValue *GV, void *Addr) |
updateGlobalMapping - Replace an existing mapping for GV with a new address. | |
uint64_t | updateGlobalMapping (StringRef Name, uint64_t Addr) |
uint64_t | getAddressToGlobalIfAvailable (StringRef S) |
getAddressToGlobalIfAvailable - This returns the address of the specified global symbol. | |
void * | getPointerToGlobalIfAvailable (StringRef S) |
getPointerToGlobalIfAvailable - This returns the address of the specified global value if it is has already been codegen'd, otherwise it returns null. | |
void * | getPointerToGlobalIfAvailable (const GlobalValue *GV) |
void * | getPointerToGlobal (const GlobalValue *GV) |
getPointerToGlobal - This returns the address of the specified global value. | |
virtual void * | getPointerToFunction (Function *F)=0 |
getPointerToFunction - The different EE's represent function bodies in different ways. | |
virtual void * | getPointerToFunctionOrStub (Function *F) |
getPointerToFunctionOrStub - If the specified function has been code-gen'd, return a pointer to the function. | |
virtual uint64_t | getGlobalValueAddress (const std::string &Name) |
getGlobalValueAddress - Return the address of the specified global value. | |
virtual uint64_t | getFunctionAddress (const std::string &Name) |
getFunctionAddress - Return the address of the specified function. | |
const GlobalValue * | getGlobalValueAtAddress (void *Addr) |
getGlobalValueAtAddress - Return the LLVM global value object that starts at the specified address. | |
void | StoreValueToMemory (const GenericValue &Val, GenericValue *Ptr, Type *Ty) |
StoreValueToMemory - Stores the data in Val of type Ty at address Ptr. | |
void | InitializeMemory (const Constant *Init, void *Addr) |
virtual void * | getOrEmitGlobalVariable (const GlobalVariable *GV) |
getOrEmitGlobalVariable - Return the address of the specified global variable, possibly emitting it to memory if needed. | |
virtual void | RegisterJITEventListener (JITEventListener *) |
Registers a listener to be called back on various events within the JIT. | |
virtual void | UnregisterJITEventListener (JITEventListener *) |
virtual void | setObjectCache (ObjectCache *) |
Sets the pre-compiled object cache. | |
virtual void | setProcessAllSections (bool ProcessAllSections) |
setProcessAllSections (MCJIT Only): By default, only sections that are "required for execution" are passed to the RTDyldMemoryManager, and other sections are discarded. | |
virtual TargetMachine * | getTargetMachine () |
Return the target machine (if available). | |
void | DisableLazyCompilation (bool Disabled=true) |
DisableLazyCompilation - When lazy compilation is off (the default), the JIT will eagerly compile every function reachable from the argument to getPointerToFunction. | |
bool | isCompilingLazily () const |
void | DisableGVCompilation (bool Disabled=true) |
DisableGVCompilation - If called, the JIT will abort if it's asked to allocate space and populate a GlobalVariable that is not internal to the module. | |
bool | isGVCompilationDisabled () const |
void | DisableSymbolSearching (bool Disabled=true) |
DisableSymbolSearching - If called, the JIT will not try to lookup unknown symbols with dlsym. | |
bool | isSymbolSearchingDisabled () const |
void | setVerifyModules (bool Verify) |
Enable/Disable IR module verification. | |
bool | getVerifyModules () const |
void | InstallLazyFunctionCreator (FunctionCreator C) |
InstallLazyFunctionCreator - If an unknown function is needed, the specified function pointer is invoked to create it. | |
Public Member Functions inherited from llvm::InstVisitor< Interpreter > | |
void | visit (Iterator Start, Iterator End) |
void | visit (Module &M) |
void | visit (Function &F) |
void | visit (BasicBlock &BB) |
void | visit (Module *M) |
void | visit (Function *F) |
void | visit (BasicBlock *BB) |
void | visit (Instruction *I) |
void | visit (Instruction &I) |
void | visitModule (Module &M) |
void | visitFunction (Function &F) |
void | visitBasicBlock (BasicBlock &BB) |
void | visitICmpInst (ICmpInst &I) |
void | visitFCmpInst (FCmpInst &I) |
void | visitAllocaInst (AllocaInst &I) |
void | visitLoadInst (LoadInst &I) |
void | visitStoreInst (StoreInst &I) |
void | visitAtomicCmpXchgInst (AtomicCmpXchgInst &I) |
void | visitAtomicRMWInst (AtomicRMWInst &I) |
void | visitFenceInst (FenceInst &I) |
void | visitGetElementPtrInst (GetElementPtrInst &I) |
void | visitPHINode (PHINode &I) |
void | visitTruncInst (TruncInst &I) |
void | visitZExtInst (ZExtInst &I) |
void | visitSExtInst (SExtInst &I) |
void | visitFPTruncInst (FPTruncInst &I) |
void | visitFPExtInst (FPExtInst &I) |
void | visitFPToUIInst (FPToUIInst &I) |
void | visitFPToSIInst (FPToSIInst &I) |
void | visitUIToFPInst (UIToFPInst &I) |
void | visitSIToFPInst (SIToFPInst &I) |
void | visitPtrToIntInst (PtrToIntInst &I) |
void | visitIntToPtrInst (IntToPtrInst &I) |
void | visitBitCastInst (BitCastInst &I) |
void | visitAddrSpaceCastInst (AddrSpaceCastInst &I) |
void | visitSelectInst (SelectInst &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 | visitLandingPadInst (LandingPadInst &I) |
void | visitFuncletPadInst (FuncletPadInst &I) |
void | visitCleanupPadInst (CleanupPadInst &I) |
void | visitCatchPadInst (CatchPadInst &I) |
void | visitFreezeInst (FreezeInst &I) |
void | visitDbgDeclareInst (DbgDeclareInst &I) |
void | visitDbgValueInst (DbgValueInst &I) |
void | visitDbgVariableIntrinsic (DbgVariableIntrinsic &I) |
void | visitDbgLabelInst (DbgLabelInst &I) |
void | visitDbgInfoIntrinsic (DbgInfoIntrinsic &I) |
void | visitMemSetInst (MemSetInst &I) |
void | visitMemSetInlineInst (MemSetInlineInst &I) |
void | visitMemSetPatternInst (MemSetPatternInst &I) |
void | visitMemCpyInst (MemCpyInst &I) |
void | visitMemCpyInlineInst (MemCpyInlineInst &I) |
void | visitMemMoveInst (MemMoveInst &I) |
void | visitMemTransferInst (MemTransferInst &I) |
void | visitMemIntrinsic (MemIntrinsic &I) |
void | visitVAStartInst (VAStartInst &I) |
void | visitVAEndInst (VAEndInst &I) |
void | visitVACopyInst (VACopyInst &I) |
void | visitIntrinsicInst (IntrinsicInst &I) |
void | visitCallInst (CallInst &I) |
void | visitInvokeInst (InvokeInst &I) |
void | visitCallBrInst (CallBrInst &I) |
void | visitReturnInst (ReturnInst &I) |
void | visitBranchInst (BranchInst &I) |
void | visitSwitchInst (SwitchInst &I) |
void | visitIndirectBrInst (IndirectBrInst &I) |
void | visitResumeInst (ResumeInst &I) |
void | visitUnreachableInst (UnreachableInst &I) |
void | visitCleanupReturnInst (CleanupReturnInst &I) |
void | visitCatchReturnInst (CatchReturnInst &I) |
void | visitCatchSwitchInst (CatchSwitchInst &I) |
void | visitTerminator (Instruction &I) |
void | visitCastInst (CastInst &I) |
void | visitUnaryOperator (UnaryOperator &I) |
void | visitBinaryOperator (BinaryOperator &I) |
void | visitCmpInst (CmpInst &I) |
void | visitUnaryInstruction (UnaryInstruction &I) |
void | visitCallBase (CallBase &I) |
void | visitInstruction (Instruction &I) |
Static Public Member Functions | |
static void | Register () |
static ExecutionEngine * | create (std::unique_ptr< Module > M, std::string *ErrorStr=nullptr) |
Create an interpreter ExecutionEngine. | |
Additional Inherited Members | |
Public Attributes inherited from llvm::ExecutionEngine | |
sys::Mutex | lock |
lock - This lock protects the ExecutionEngine and MCJIT classes. | |
Protected Member Functions inherited from llvm::ExecutionEngine | |
virtual char * | getMemoryForGV (const GlobalVariable *GV) |
getMemoryforGV - Allocate memory for a global variable. | |
std::string | getMangledName (const GlobalValue *GV) |
getMangledName - Get mangled name. | |
ExecutionEngine (DataLayout DL) | |
ExecutionEngine (DataLayout DL, std::unique_ptr< Module > M) | |
ExecutionEngine (std::unique_ptr< Module > M) | |
void | emitGlobals () |
EmitGlobals - Emit all of the global variables to memory, storing their addresses into GlobalAddress. | |
void | emitGlobalVariable (const GlobalVariable *GV) |
GenericValue | getConstantValue (const Constant *C) |
Converts a Constant* into a GenericValue, including handling of ConstantExpr values. | |
void | LoadValueFromMemory (GenericValue &Result, GenericValue *Ptr, Type *Ty) |
FIXME: document. | |
Protected Attributes inherited from llvm::ExecutionEngine | |
SmallVector< std::unique_ptr< Module >, 1 > | Modules |
The list of Modules that we are JIT'ing from. | |
FunctionCreator | LazyFunctionCreator |
LazyFunctionCreator - If an unknown function is needed, this function pointer is invoked to create it. | |
std::string | ErrMsg |
Static Protected Attributes inherited from llvm::ExecutionEngine | |
static ExecutionEngine *(* | MCJITCtor )(std::unique_ptr< Module > M, std::string *ErrorStr, std::shared_ptr< MCJITMemoryManager > MM, std::shared_ptr< LegacyJITSymbolResolver > SR, std::unique_ptr< TargetMachine > TM) = nullptr |
static ExecutionEngine *(* | InterpCtor )(std::unique_ptr< Module > M, std::string *ErrorStr) =nullptr |
Definition at line 74 of file Interpreter.h.
|
explicit |
Definition at line 54 of file Interpreter.cpp.
References llvm::ExecutionEngine::emitGlobals(), llvm::ExecutionEngine::getDataLayout(), and llvm::GenericValue::Untyped.
|
override |
Definition at line 66 of file Interpreter.cpp.
|
inline |
GenericValue Interpreter::callExternalFunction | ( | Function * | F, |
ArrayRef< GenericValue > | ArgVals | ||
) |
Definition at line 269 of file ExternalFunctions.cpp.
References llvm::errs(), F, llvm::ExecutionEngine::getDataLayout(), llvm::ExecutionEngine::getPointerToGlobalIfAvailable(), lookupFunction(), llvm::report_fatal_error(), llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(), and TheInterpreter.
Referenced by callFunction().
void Interpreter::callFunction | ( | Function * | F, |
ArrayRef< GenericValue > | ArgVals | ||
) |
Definition at line 2037 of file Execution.cpp.
References assert(), llvm::BasicBlock::begin(), llvm::ArrayRef< T >::begin(), callExternalFunction(), llvm::ExecutionContext::CurBB, llvm::ExecutionContext::CurFunction, llvm::ExecutionContext::CurInst, llvm::ArrayRef< T >::end(), F, SetValue(), llvm::ArrayRef< T >::size(), and llvm::ExecutionContext::VarArgs.
Referenced by runAtExitHandlers(), runFunction(), and visitCallBase().
|
static |
Create an interpreter ExecutionEngine.
Create a new interpreter object.
Definition at line 34 of file Interpreter.cpp.
References llvm::handleAllErrors(), and llvm::ErrorInfoBase::message().
Referenced by Register().
void Interpreter::exitCalled | ( | GenericValue | GV | ) |
Definition at line 839 of file Execution.cpp.
References llvm::APInt::getZExtValue(), llvm::GenericValue::IntVal, runAtExitHandlers(), and llvm::APInt::zextOrTrunc().
Referenced by lle_X_exit().
|
inline |
Definition at line 183 of file Interpreter.h.
|
inlineoverridevirtual |
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 109 of file Interpreter.h.
|
inlinestatic |
Definition at line 95 of file Interpreter.h.
References create(), and llvm::ExecutionEngine::InterpCtor.
void Interpreter::run | ( | ) |
Definition at line 2074 of file Execution.cpp.
References llvm::ExecutionContext::CurInst, llvm::dbgs(), I, LLVM_DEBUG, and llvm::InstVisitor< Interpreter >::visit().
Referenced by runAtExitHandlers(), and runFunction().
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 70 of file Interpreter.cpp.
References callFunction(), and run().
Referenced by exitCalled().
|
overridevirtual |
run - Start execution with the specified function and arguments.
Implements llvm::ExecutionEngine.
Definition at line 80 of file Interpreter.cpp.
References assert(), callFunction(), F, run(), llvm::ArrayRef< T >::size(), and llvm::ArrayRef< T >::slice().
void Interpreter::visitAllocaInst | ( | AllocaInst & | I | ) |
Definition at line 981 of file Execution.cpp.
References assert(), llvm::dbgs(), llvm::ExecutionEngine::getDataLayout(), llvm::DataLayout::getTypeAllocSize(), llvm::APInt::getZExtValue(), I, llvm::GenericValue::IntVal, LLVM_DEBUG, llvm::PTOGV(), llvm::safe_malloc(), and SetValue().
void Interpreter::visitAShr | ( | BinaryOperator & | I | ) |
Definition at line 1204 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::APInt::ashr(), assert(), getShiftAmount(), llvm::APInt::getZExtValue(), I, llvm::GenericValue::IntVal, llvm::Type::isVectorTy(), and SetValue().
void Interpreter::visitBinaryOperator | ( | BinaryOperator & | I | ) |
Definition at line 700 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, assert(), llvm::dbgs(), executeFAddInst(), executeFDivInst(), executeFMulInst(), executeFRemInst(), executeFSubInst(), FLOAT_VECTOR_OP, I, INTEGER_VECTOR_FUNCTION, INTEGER_VECTOR_OPERATION, llvm::GenericValue::IntVal, llvm::Type::isVectorTy(), llvm_unreachable, llvm::APInt::sdiv(), SetValue(), llvm::APInt::srem(), llvm::APInt::udiv(), and llvm::APInt::urem().
void Interpreter::visitBitCastInst | ( | BitCastInst & | I | ) |
Definition at line 1721 of file Execution.cpp.
References I, and SetValue().
void Interpreter::visitBranchInst | ( | BranchInst & | I | ) |
Definition at line 900 of file Execution.cpp.
void Interpreter::visitCallBase | ( | CallBase & | I | ) |
Definition at line 1122 of file Execution.cpp.
References llvm::CallBase::arg_size(), llvm::CallBase::args(), llvm::ExecutionContext::Caller, callFunction(), llvm::CallBase::getCalledOperand(), llvm::GVTOP(), and I.
void Interpreter::visitExtractElementInst | ( | ExtractElementInst & | I | ) |
Definition at line 1758 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::dbgs(), llvm::Type::DoubleTyID, llvm::GenericValue::DoubleVal, llvm::Type::FloatTyID, llvm::GenericValue::FloatVal, llvm::Type::getTypeID(), llvm::APInt::getZExtValue(), I, llvm::Type::IntegerTyID, llvm::GenericValue::IntVal, llvm_unreachable, and SetValue().
void Interpreter::visitExtractValueInst | ( | ExtractValueInst & | I | ) |
Definition at line 1890 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::Type::ArrayTyID, llvm::Type::DoubleTyID, llvm::GenericValue::DoubleVal, llvm::Type::FixedVectorTyID, llvm::Type::FloatTyID, llvm::GenericValue::FloatVal, llvm::ExtractValueInst::getIndexedType(), llvm::Value::getType(), llvm::Type::getTypeID(), I, llvm::Type::IntegerTyID, llvm::GenericValue::IntVal, llvm_unreachable, llvm::Type::PointerTyID, llvm::GenericValue::PointerVal, llvm::Type::ScalableVectorTyID, SetValue(), and llvm::Type::StructTyID.
void Interpreter::visitFCmpInst | ( | FCmpInst & | I | ) |
Definition at line 665 of file Execution.cpp.
References llvm::dbgs(), executeFCMP_BOOL(), executeFCMP_OEQ(), executeFCMP_OGE(), executeFCMP_OGT(), executeFCMP_OLE(), executeFCMP_OLT(), executeFCMP_ONE(), executeFCMP_ORD(), executeFCMP_UEQ(), executeFCMP_UGE(), executeFCMP_UGT(), executeFCMP_ULE(), executeFCMP_ULT(), executeFCMP_UNE(), executeFCMP_UNO(), llvm::CmpInst::FCMP_FALSE, llvm::CmpInst::FCMP_OEQ, llvm::CmpInst::FCMP_OGE, llvm::CmpInst::FCMP_OGT, llvm::CmpInst::FCMP_OLE, llvm::CmpInst::FCMP_OLT, llvm::CmpInst::FCMP_ONE, llvm::CmpInst::FCMP_ORD, llvm::CmpInst::FCMP_TRUE, llvm::CmpInst::FCMP_UEQ, llvm::CmpInst::FCMP_UGE, llvm::CmpInst::FCMP_UGT, llvm::CmpInst::FCMP_ULE, llvm::CmpInst::FCMP_ULT, llvm::CmpInst::FCMP_UNE, llvm::CmpInst::FCMP_UNO, I, llvm_unreachable, and SetValue().
void Interpreter::visitFPExtInst | ( | FPExtInst & | I | ) |
Definition at line 1686 of file Execution.cpp.
References I, and SetValue().
void Interpreter::visitFPToSIInst | ( | FPToSIInst & | I | ) |
Definition at line 1706 of file Execution.cpp.
References I, and SetValue().
void Interpreter::visitFPToUIInst | ( | FPToUIInst & | I | ) |
Definition at line 1701 of file Execution.cpp.
References I, and SetValue().
void Interpreter::visitFPTruncInst | ( | FPTruncInst & | I | ) |
Definition at line 1681 of file Execution.cpp.
References I, and SetValue().
void Interpreter::visitGetElementPtrInst | ( | GetElementPtrInst & | I | ) |
Definition at line 1051 of file Execution.cpp.
References llvm::gep_type_begin(), llvm::gep_type_end(), I, and SetValue().
void Interpreter::visitICmpInst | ( | ICmpInst & | I | ) |
Definition at line 332 of file Execution.cpp.
References llvm::dbgs(), executeICMP_EQ(), executeICMP_NE(), executeICMP_SGE(), executeICMP_SGT(), executeICMP_SLE(), executeICMP_SLT(), executeICMP_UGE(), executeICMP_UGT(), executeICMP_ULE(), executeICMP_ULT(), I, llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::CmpInst::ICMP_SGE, llvm::CmpInst::ICMP_SGT, llvm::CmpInst::ICMP_SLE, llvm::CmpInst::ICMP_SLT, llvm::CmpInst::ICMP_UGE, llvm::CmpInst::ICMP_UGT, llvm::CmpInst::ICMP_ULE, llvm::CmpInst::ICMP_ULT, llvm_unreachable, and SetValue().
void Interpreter::visitIndirectBrInst | ( | IndirectBrInst & | I | ) |
Definition at line 932 of file Execution.cpp.
References llvm::GVTOP(), and I.
void Interpreter::visitInsertElementInst | ( | InsertElementInst & | I | ) |
Definition at line 1791 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::Type::DoubleTyID, llvm::GenericValue::DoubleVal, llvm::Type::FloatTyID, llvm::GenericValue::FloatVal, llvm::VectorType::getElementType(), llvm::Type::getTypeID(), llvm::APInt::getZExtValue(), I, llvm::Type::IntegerTyID, llvm::GenericValue::IntVal, llvm_unreachable, and SetValue().
void Interpreter::visitInsertValueInst | ( | InsertValueInst & | I | ) |
Definition at line 1933 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::Type::ArrayTyID, llvm::Type::DoubleTyID, llvm::GenericValue::DoubleVal, llvm::Type::FixedVectorTyID, llvm::Type::FloatTyID, llvm::GenericValue::FloatVal, llvm::ExtractValueInst::getIndexedType(), llvm::Value::getType(), llvm::Type::getTypeID(), I, llvm::Type::IntegerTyID, llvm::GenericValue::IntVal, llvm_unreachable, llvm::Type::PointerTyID, llvm::GenericValue::PointerVal, llvm::Type::ScalableVectorTyID, SetValue(), and llvm::Type::StructTyID.
|
inline |
Definition at line 170 of file Interpreter.h.
References llvm::errs(), I, and llvm_unreachable.
void Interpreter::visitIntrinsicInst | ( | IntrinsicInst & | I | ) |
Definition at line 1099 of file Execution.cpp.
References llvm::BasicBlock::begin(), llvm::ExecutionContext::CurInst, I, and llvm::IntrinsicLowering::LowerIntrinsicCall().
void Interpreter::visitIntToPtrInst | ( | IntToPtrInst & | I | ) |
Definition at line 1716 of file Execution.cpp.
References I, and SetValue().
void Interpreter::visitLoadInst | ( | LoadInst & | I | ) |
Definition at line 1057 of file Execution.cpp.
References llvm::dbgs(), llvm::GVTOP(), I, llvm::ExecutionEngine::LoadValueFromMemory(), PrintVolatile, Ptr, and SetValue().
void Interpreter::visitLShr | ( | BinaryOperator & | I | ) |
Definition at line 1177 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, assert(), getShiftAmount(), llvm::APInt::getZExtValue(), I, llvm::GenericValue::IntVal, llvm::Type::isVectorTy(), llvm::APInt::lshr(), and SetValue().
|
inline |
Definition at line 134 of file Interpreter.h.
References llvm_unreachable.
void Interpreter::visitPtrToIntInst | ( | PtrToIntInst & | I | ) |
Definition at line 1711 of file Execution.cpp.
References I, and SetValue().
void Interpreter::visitReturnInst | ( | ReturnInst & | I | ) |
Definition at line 882 of file Execution.cpp.
References llvm::Type::getVoidTy(), I, and RetTy.
void Interpreter::visitSelectInst | ( | SelectInst & | I | ) |
Definition at line 825 of file Execution.cpp.
References executeSelectInst(), I, and SetValue().
void Interpreter::visitSExtInst | ( | SExtInst & | I | ) |
Definition at line 1671 of file Execution.cpp.
References I, and SetValue().
void Interpreter::visitShl | ( | BinaryOperator & | I | ) |
Definition at line 1150 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, assert(), getShiftAmount(), llvm::APInt::getZExtValue(), I, llvm::GenericValue::IntVal, llvm::Type::isVectorTy(), SetValue(), and llvm::APInt::shl().
void Interpreter::visitShuffleVectorInst | ( | ShuffleVectorInst & | I | ) |
Definition at line 1823 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::Type::DoubleTyID, llvm::Type::FloatTyID, llvm::VectorType::getElementType(), llvm::Type::getTypeID(), I, llvm::Type::IntegerTyID, llvm_unreachable, and SetValue().
void Interpreter::visitSIToFPInst | ( | SIToFPInst & | I | ) |
Definition at line 1696 of file Execution.cpp.
References I, and SetValue().
void Interpreter::visitStoreInst | ( | StoreInst & | I | ) |
Definition at line 1068 of file Execution.cpp.
References llvm::dbgs(), llvm::GVTOP(), I, PrintVolatile, and llvm::ExecutionEngine::StoreValueToMemory().
void Interpreter::visitSwitchInst | ( | SwitchInst & | I | ) |
Definition at line 913 of file Execution.cpp.
References Cond, executeICMP_EQ(), and I.
void Interpreter::visitTruncInst | ( | TruncInst & | I | ) |
Definition at line 1666 of file Execution.cpp.
References I, and SetValue().
void Interpreter::visitUIToFPInst | ( | UIToFPInst & | I | ) |
Definition at line 1691 of file Execution.cpp.
References I, and SetValue().
void Interpreter::visitUnaryOperator | ( | UnaryOperator & | I | ) |
Definition at line 62 of file Execution.cpp.
References executeFNegInst(), I, llvm::Type::isVectorTy(), llvm_unreachable, and SetValue().
void Interpreter::visitUnreachableInst | ( | UnreachableInst & | I | ) |
Definition at line 896 of file Execution.cpp.
References llvm::report_fatal_error().
void Interpreter::visitVAArgInst | ( | VAArgInst & | I | ) |
Definition at line 1729 of file Execution.cpp.
References llvm::dbgs(), llvm::GenericValue::IntPair::first, Float, llvm::Type::getTypeID(), I, IMPLEMENT_VAARG, llvm::Type::IntegerTyID, llvm::GenericValue::IntVal, llvm_unreachable, llvm::GenericValue::IntPair::second, SetValue(), and llvm::GenericValue::UIntPairVal.
void Interpreter::visitVACopyInst | ( | VACopyInst & | I | ) |
Definition at line 1094 of file Execution.cpp.
References I, and SetValue().
void Interpreter::visitVAEndInst | ( | VAEndInst & | I | ) |
Definition at line 1090 of file Execution.cpp.
void Interpreter::visitVAStartInst | ( | VAStartInst & | I | ) |
Definition at line 1082 of file Execution.cpp.
References llvm::GenericValue::IntPair::first, I, llvm::GenericValue::IntPair::second, SetValue(), and llvm::GenericValue::UIntPairVal.
void Interpreter::visitZExtInst | ( | ZExtInst & | I | ) |
Definition at line 1676 of file Execution.cpp.
References I, and SetValue().