|
LLVM
3.7.0
|
#include <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. More... | |
| GenericValue | runFunction (Function *F, ArrayRef< GenericValue > ArgValues) override |
| run - Start execution with the specified function and arguments. More... | |
| void * | getPointerToNamedFunction (StringRef Name, bool AbortOnFailure=true) override |
| getPointerToNamedFunction - This method returns the address of the specified function by using the dlsym function call. More... | |
| 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 | 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, 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. More... | |
| virtual void | addObjectFile (std::unique_ptr< object::ObjectFile > O) |
| addObjectFile - Add an ObjectFile to the execution engine. More... | |
| virtual void | addObjectFile (object::OwningBinary< object::ObjectFile > O) |
| virtual void | addArchive (object::OwningBinary< object::Archive > A) |
| addArchive - Add an Archive to the execution engine. More... | |
| const DataLayout * | getDataLayout () const |
| virtual bool | removeModule (Module *M) |
| removeModule - Remove a Module from the list of modules. More... | |
| virtual Function * | FindFunctionNamed (const char *FnName) |
| FindFunctionNamed - Search all of the active modules to find the function that defines FnName. More... | |
| virtual GlobalVariable * | FindGlobalVariableNamed (const char *Name, bool AllowInternal=false) |
| FindGlobalVariableNamed - Search all of the active modules to find the global variable that defines Name. More... | |
| virtual void | mapSectionAddress (const void *LocalAddress, uint64_t TargetAddress) |
| mapSectionAddress - map a section to its target address space value. More... | |
| virtual void | generateCodeForModule (Module *M) |
| generateCodeForModule - Run code generation for the specified module and load it into memory. More... | |
| virtual void | finalizeObject () |
| finalizeObject - ensure the module is fully processed and is usable. More... | |
| virtual void | runStaticConstructorsDestructors (bool isDtors) |
| runStaticConstructorsDestructors - This method is used to execute all of the static constructors or destructors for a program. More... | |
| void | runStaticConstructorsDestructors (Module &module, bool isDtors) |
| This method is used to execute all of the static constructors or destructors for a particular module. More... | |
| 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. More... | |
| void | addGlobalMapping (const GlobalValue *GV, void *Addr) |
| addGlobalMapping - Tell the execution engine that the specified global is at the specified location. More... | |
| 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. More... | |
| void | clearGlobalMappingsFromModule (Module *M) |
| clearGlobalMappingsFromModule - Clear all global mappings that came from a particular module, because it has been removed from the JIT. More... | |
| uint64_t | updateGlobalMapping (const GlobalValue *GV, void *Addr) |
| updateGlobalMapping - Replace an existing mapping for GV with a new address. More... | |
| uint64_t | updateGlobalMapping (StringRef Name, uint64_t Addr) |
| uint64_t | getAddressToGlobalIfAvailable (StringRef S) |
| getAddressToGlobalIfAvailable - This returns the address of the specified global symbol. More... | |
| 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. More... | |
| void * | getPointerToGlobalIfAvailable (const GlobalValue *GV) |
| void * | getPointerToGlobal (const GlobalValue *GV) |
| getPointerToGlobal - This returns the address of the specified global value. More... | |
| virtual void * | getPointerToFunctionOrStub (Function *F) |
| getPointerToFunctionOrStub - If the specified function has been code-gen'd, return a pointer to the function. More... | |
| virtual uint64_t | getGlobalValueAddress (const std::string &Name) |
| getGlobalValueAddress - Return the address of the specified global value. More... | |
| virtual uint64_t | getFunctionAddress (const std::string &Name) |
| getFunctionAddress - Return the address of the specified function. More... | |
| const GlobalValue * | getGlobalValueAtAddress (void *Addr) |
| getGlobalValueAtAddress - Return the LLVM global value object that starts at the specified address. More... | |
| void | StoreValueToMemory (const GenericValue &Val, GenericValue *Ptr, Type *Ty) |
| StoreValueToMemory - Stores the data in Val of type Ty at address Ptr. More... | |
| 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. More... | |
| virtual void | RegisterJITEventListener (JITEventListener *) |
| Registers a listener to be called back on various events within the JIT. More... | |
| virtual void | UnregisterJITEventListener (JITEventListener *) |
| virtual void | setObjectCache (ObjectCache *) |
| Sets the pre-compiled object cache. More... | |
| 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. More... | |
| virtual TargetMachine * | getTargetMachine () |
| Return the target machine (if available). More... | |
| 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. More... | |
| 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. More... | |
| bool | isGVCompilationDisabled () const |
| void | DisableSymbolSearching (bool Disabled=true) |
| DisableSymbolSearching - If called, the JIT will not try to lookup unknown symbols with dlsym. More... | |
| bool | isSymbolSearchingDisabled () const |
| void | setVerifyModules (bool Verify) |
| Enable/Disable IR module verification. More... | |
| bool | getVerifyModules () const |
| void | InstallLazyFunctionCreator (FunctionCreator C) |
| InstallLazyFunctionCreator - If an unknown function is needed, the specified function pointer is invoked to create it. More... | |
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 | visitReturnInst (ReturnInst &I) |
| void | visitBranchInst (BranchInst &I) |
| void | visitSwitchInst (SwitchInst &I) |
| void | visitIndirectBrInst (IndirectBrInst &I) |
| void | visitResumeInst (ResumeInst &I) |
| void | visitUnreachableInst (UnreachableInst &I) |
| 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 | visitDbgDeclareInst (DbgDeclareInst &I) |
| void | visitDbgValueInst (DbgValueInst &I) |
| void | visitDbgInfoIntrinsic (DbgInfoIntrinsic &I) |
| void | visitMemSetInst (MemSetInst &I) |
| void | visitMemCpyInst (MemCpyInst &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 | visitCastInst (CastInst &I) |
| void | visitBinaryOperator (BinaryOperator &I) |
| void | visitCmpInst (CmpInst &I) |
| void | visitTerminatorInst (TerminatorInst &I) |
| void | visitUnaryInstruction (UnaryInstruction &I) |
| void | visitCallSite (CallSite CS) |
| 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. More... | |
Additional Inherited Members | |
Public Attributes inherited from llvm::ExecutionEngine | |
| sys::Mutex | lock |
| lock - This lock protects the ExecutionEngine and MCJIT classes. More... | |
Protected Member Functions inherited from llvm::ExecutionEngine | |
| void | setDataLayout (const DataLayout *Val) |
| virtual char * | getMemoryForGV (const GlobalVariable *GV) |
| getMemoryforGV - Allocate memory for a global variable. More... | |
| std::string | getMangledName (const GlobalValue *GV) |
| getMangledName - Get mangled name. More... | |
| ExecutionEngine () | |
| ExecutionEngine (std::unique_ptr< Module > M) | |
| void | emitGlobals () |
| EmitGlobals - Emit all of the global variables to memory, storing their addresses into GlobalAddress. More... | |
| void | EmitGlobalVariable (const GlobalVariable *GV) |
| GenericValue | getConstantValue (const Constant *C) |
| Converts a Constant* into a GenericValue, including handling of ConstantExpr values. More... | |
| void | LoadValueFromMemory (GenericValue &Result, GenericValue *Ptr, Type *Ty) |
| FIXME: document. More... | |
Protected Attributes inherited from llvm::ExecutionEngine | |
| SmallVector< std::unique_ptr < Module >, 1 > | Modules |
| The list of Modules that we are JIT'ing from. More... | |
| FunctionCreator | LazyFunctionCreator |
| LazyFunctionCreator - If an unknown function is needed, this function pointer is invoked to create it. More... | |
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< RuntimeDyld::SymbolResolver > SR, std::unique_ptr< TargetMachine > TM) = nullptr |
| static ExecutionEngine *(* | OrcMCJITReplacementCtor )(std::string *ErrorStr, std::shared_ptr< MCJITMemoryManager > MM, std::shared_ptr< RuntimeDyld::SymbolResolver > SR, std::unique_ptr< TargetMachine > TM) = nullptr |
| static ExecutionEngine *(* | InterpCtor )(std::unique_ptr< Module > M, std::string *ErrorStr) =nullptr |
Definition at line 96 of file lib/ExecutionEngine/Interpreter/Interpreter.h.
|
explicit |
Definition at line 51 of file Interpreter.cpp.
References llvm::ExecutionEngine::emitGlobals(), llvm::ExecutionEngine::setDataLayout(), and llvm::GenericValue::Untyped.
Referenced by create().
|
override |
Definition at line 64 of file Interpreter.cpp.
|
inline |
Definition at line 200 of file lib/ExecutionEngine/Interpreter/Interpreter.h.
Referenced by lle_X_atexit().
| GenericValue Interpreter::callExternalFunction | ( | Function * | F, |
| ArrayRef< GenericValue > | ArgVals | ||
| ) |
Definition at line 245 of file ExternalFunctions.cpp.
References llvm::errs(), ExportedFunctions, FunctionsLock, llvm::ExecutionEngine::getDataLayout(), llvm::Function::getFunctionType(), llvm::Value::getName(), llvm::ExecutionEngine::getPointerToGlobalIfAvailable(), llvm::GlobalValue::getType(), lookupFunction(), llvm::report_fatal_error(), llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(), TheInterpreter, and llvm::unique_lock< MutexT >::unlock().
Referenced by callFunction().
| void Interpreter::callFunction | ( | Function * | F, |
| ArrayRef< GenericValue > | ArgVals | ||
| ) |
Definition at line 2076 of file Execution.cpp.
References llvm::Function::arg_begin(), llvm::Function::arg_end(), llvm::Function::arg_size(), llvm::ArrayRef< T >::begin(), llvm::BasicBlock::begin(), llvm::Function::begin(), callExternalFunction(), llvm::ExecutionContext::CurBB, llvm::ExecutionContext::CurFunction, llvm::ExecutionContext::CurInst, llvm::ArrayRef< T >::end(), F(), llvm::Function::getFunctionType(), llvm::Function::getReturnType(), llvm::GlobalValue::isDeclaration(), llvm::FunctionType::isVarArg(), SetValue(), llvm::ArrayRef< T >::size(), and llvm::ExecutionContext::VarArgs.
Referenced by runAtExitHandlers(), runFunction(), and visitCallSite().
|
static |
Create an interpreter ExecutionEngine.
Create a new interpreter object.
Definition at line 35 of file Interpreter.cpp.
References Interpreter().
Referenced by Register().
| void Interpreter::exitCalled | ( | GenericValue | GV | ) |
Definition at line 820 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 204 of file lib/ExecutionEngine/Interpreter/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 132 of file lib/ExecutionEngine/Interpreter/Interpreter.h.
|
inlinestatic |
Definition at line 118 of file lib/ExecutionEngine/Interpreter/Interpreter.h.
References create(), and llvm::ExecutionEngine::InterpCtor.
| void Interpreter::run | ( | ) |
Definition at line 2113 of file Execution.cpp.
References llvm::ExecutionContext::CurInst, llvm::dbgs(), DEBUG, llvm::Type::DoubleTyID, llvm::GenericValue::DoubleVal, llvm::Type::FloatTyID, llvm::GenericValue::FloatVal, llvm::APInt::getBitWidth(), llvm::Value::getType(), llvm::Type::getTypeID(), I, llvm::Type::IntegerTyID, llvm::GenericValue::IntVal, llvm_unreachable, llvm::Type::PointerTyID, llvm::GenericValue::PointerVal, llvm::APInt::toStringUnsigned(), llvm::ExecutionContext::Values, llvm::InstVisitor< Interpreter >::visit(), and llvm::Type::VoidTyID.
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 68 of file Interpreter.cpp.
References callFunction(), llvm::None, and run().
Referenced by exitCalled().
|
overridevirtual |
run - Start execution with the specified function and arguments.
Implements llvm::ExecutionEngine.
Definition at line 78 of file Interpreter.cpp.
References callFunction(), llvm::Function::getFunctionType(), llvm::FunctionType::getNumParams(), fuzzer::min(), run(), llvm::ArrayRef< T >::size(), and llvm::ArrayRef< T >::slice().
| void Interpreter::visitAllocaInst | ( | AllocaInst & | I | ) |
Definition at line 962 of file Execution.cpp.
References llvm::dbgs(), DEBUG, llvm::SequentialType::getElementType(), llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::AllocaInst::getType(), llvm::DataLayout::getTypeAllocSize(), llvm::tgtok::IntVal, llvm::GenericValue::PointerVal, llvm::PTOGV(), and SetValue().
| void Interpreter::visitAShr | ( | BinaryOperator & | I | ) |
Definition at line 1191 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::APInt::ashr(), llvm::User::getOperand(), getShiftAmount(), llvm::Value::getType(), llvm::APInt::getZExtValue(), llvm::GenericValue::IntVal, llvm::Type::isVectorTy(), and SetValue().
| void Interpreter::visitBinaryOperator | ( | BinaryOperator & | I | ) |
Definition at line 681 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::APIntOps::And(), llvm::dbgs(), executeFAddInst(), executeFDivInst(), executeFMulInst(), executeFRemInst(), executeFSubInst(), FLOAT_VECTOR_OP, llvm::BinaryOperator::getOpcode(), llvm::User::getOperand(), llvm::Value::getType(), I, INTEGER_VECTOR_FUNCTION, INTEGER_VECTOR_OPERATION, llvm::GenericValue::IntVal, llvm::Type::isVectorTy(), llvm_unreachable, llvm::APIntOps::Or(), llvm::APInt::sdiv(), llvm::APIntOps::sdiv(), SetValue(), llvm::APInt::srem(), llvm::APIntOps::srem(), llvm::APInt::udiv(), llvm::APIntOps::udiv(), llvm::APInt::urem(), llvm::APIntOps::urem(), and llvm::APIntOps::Xor().
| void Interpreter::visitBitCastInst | ( | BitCastInst & | I | ) |
Definition at line 1710 of file Execution.cpp.
References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().
| void Interpreter::visitBranchInst | ( | BranchInst & | I | ) |
Definition at line 881 of file Execution.cpp.
References llvm::BranchInst::getCondition(), llvm::BranchInst::getSuccessor(), llvm::tgtok::IntVal, and llvm::BranchInst::isUnconditional().
|
inline |
Definition at line 175 of file lib/ExecutionEngine/Interpreter/Interpreter.h.
References visitCallSite().
| void Interpreter::visitCallSite | ( | CallSite | CS | ) |
Definition at line 1064 of file Execution.cpp.
References llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_begin(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_end(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_size(), llvm::ExecutionContext::Caller, callFunction(), llvm::CS, llvm::ExecutionContext::CurInst, F(), llvm::GenericValue::IntPair::first, llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledFunction(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledValue(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::Function::getIntrinsicID(), llvm::Instruction::getParent(), llvm::GVTOP(), llvm::GlobalValue::isDeclaration(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::Intrinsic::not_intrinsic, llvm::GenericValue::IntPair::second, SetValue(), and llvm::GenericValue::UIntPairVal.
Referenced by visitCallInst(), and visitInvokeInst().
| void Interpreter::visitExtractElementInst | ( | ExtractElementInst & | I | ) |
Definition at line 1747 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::dbgs(), llvm::Type::DoubleTyID, llvm::Type::FloatTyID, llvm::User::getOperand(), llvm::Value::getType(), llvm::Type::getTypeID(), llvm::Type::IntegerTyID, llvm_unreachable, and SetValue().
| void Interpreter::visitExtractValueInst | ( | ExtractValueInst & | I | ) |
Definition at line 1885 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::Type::ArrayTyID, llvm::Type::DoubleTyID, llvm::GenericValue::DoubleVal, llvm::Type::FloatTyID, llvm::GenericValue::FloatVal, llvm::ExtractValueInst::getAggregateOperand(), llvm::ExtractValueInst::getIndexedType(), llvm::ExtractValueInst::getIndices(), llvm::ExtractValueInst::getNumIndices(), llvm::Value::getType(), llvm::Type::getTypeID(), llvm::ExtractValueInst::idx_begin(), llvm::Type::IntegerTyID, llvm::GenericValue::IntVal, llvm_unreachable, llvm::Type::PointerTyID, llvm::GenericValue::PointerVal, SetValue(), llvm::Type::StructTyID, and llvm::Type::VectorTyID.
| void Interpreter::visitFCmpInst | ( | FCmpInst & | I | ) |
Definition at line 610 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, llvm::User::getOperand(), llvm::CmpInst::getPredicate(), llvm::Value::getType(), I, llvm_unreachable, and SetValue().
| void Interpreter::visitFPExtInst | ( | FPExtInst & | I | ) |
Definition at line 1675 of file Execution.cpp.
References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().
| void Interpreter::visitFPToSIInst | ( | FPToSIInst & | I | ) |
Definition at line 1695 of file Execution.cpp.
References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().
| void Interpreter::visitFPToUIInst | ( | FPToUIInst & | I | ) |
Definition at line 1690 of file Execution.cpp.
References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().
| void Interpreter::visitFPTruncInst | ( | FPTruncInst & | I | ) |
Definition at line 1670 of file Execution.cpp.
References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().
| void Interpreter::visitGetElementPtrInst | ( | GetElementPtrInst & | I | ) |
Definition at line 1033 of file Execution.cpp.
References llvm::gep_type_begin(), llvm::gep_type_end(), llvm::GetElementPtrInst::getPointerOperand(), and SetValue().
| void Interpreter::visitICmpInst | ( | ICmpInst & | I | ) |
Definition at line 278 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(), llvm::User::getOperand(), llvm::CmpInst::getPredicate(), llvm::Value::getType(), 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 913 of file Execution.cpp.
References llvm::IndirectBrInst::getAddress(), and llvm::GVTOP().
| void Interpreter::visitInsertElementInst | ( | InsertElementInst & | I | ) |
Definition at line 1780 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::Type::DoubleTyID, llvm::Type::FloatTyID, llvm::Type::getContainedType(), llvm::User::getOperand(), llvm::InsertElementInst::getType(), llvm::Type::getTypeID(), llvm::Type::IntegerTyID, llvm::Type::isVectorTy(), llvm_unreachable, and SetValue().
| void Interpreter::visitInsertValueInst | ( | InsertValueInst & | I | ) |
Definition at line 1927 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::Type::ArrayTyID, llvm::Type::DoubleTyID, llvm::GenericValue::DoubleVal, llvm::Type::FloatTyID, llvm::GenericValue::FloatVal, llvm::InsertValueInst::getAggregateOperand(), llvm::ExtractValueInst::getIndexedType(), llvm::InsertValueInst::getIndices(), llvm::InsertValueInst::getNumIndices(), llvm::User::getOperand(), llvm::Value::getType(), llvm::Type::getTypeID(), llvm::InsertValueInst::idx_begin(), llvm::Type::IntegerTyID, llvm::GenericValue::IntVal, llvm_unreachable, llvm::Type::PointerTyID, llvm::GenericValue::PointerVal, SetValue(), llvm::Type::StructTyID, and llvm::Type::VectorTyID.
|
inline |
Definition at line 191 of file lib/ExecutionEngine/Interpreter/Interpreter.h.
References llvm::errs(), and llvm_unreachable.
| void Interpreter::visitIntToPtrInst | ( | IntToPtrInst & | I | ) |
Definition at line 1705 of file Execution.cpp.
References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().
|
inline |
Definition at line 176 of file lib/ExecutionEngine/Interpreter/Interpreter.h.
References visitCallSite().
| void Interpreter::visitLoadInst | ( | LoadInst & | I | ) |
Definition at line 1039 of file Execution.cpp.
References llvm::dbgs(), llvm::LoadInst::getPointerOperand(), llvm::Value::getType(), llvm::GVTOP(), I, llvm::LoadInst::isVolatile(), llvm::ExecutionEngine::LoadValueFromMemory(), PrintVolatile, and SetValue().
| void Interpreter::visitLShr | ( | BinaryOperator & | I | ) |
Definition at line 1164 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::User::getOperand(), getShiftAmount(), llvm::Value::getType(), llvm::APInt::getZExtValue(), llvm::GenericValue::IntVal, llvm::Type::isVectorTy(), llvm::APInt::lshr(), and SetValue().
|
inline |
Definition at line 156 of file lib/ExecutionEngine/Interpreter/Interpreter.h.
References llvm_unreachable.
| void Interpreter::visitPtrToIntInst | ( | PtrToIntInst & | I | ) |
Definition at line 1700 of file Execution.cpp.
References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().
| void Interpreter::visitReturnInst | ( | ReturnInst & | I | ) |
Definition at line 863 of file Execution.cpp.
References llvm::Value::getContext(), llvm::User::getNumOperands(), llvm::ReturnInst::getReturnValue(), llvm::Value::getType(), and llvm::Type::getVoidTy().
| void Interpreter::visitSelectInst | ( | SelectInst & | I | ) |
Definition at line 806 of file Execution.cpp.
References executeSelectInst(), llvm::User::getOperand(), llvm::Value::getType(), and SetValue().
| void Interpreter::visitSExtInst | ( | SExtInst & | I | ) |
Definition at line 1660 of file Execution.cpp.
References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().
| void Interpreter::visitShl | ( | BinaryOperator & | I | ) |
Definition at line 1137 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::User::getOperand(), getShiftAmount(), llvm::Value::getType(), llvm::APInt::getZExtValue(), llvm::GenericValue::IntVal, llvm::Type::isVectorTy(), SetValue(), and llvm::APInt::shl().
| void Interpreter::visitShuffleVectorInst | ( | ShuffleVectorInst & | I | ) |
Definition at line 1815 of file Execution.cpp.
References llvm::GenericValue::AggregateVal, llvm::Type::DoubleTyID, llvm::Type::FloatTyID, llvm::Type::getContainedType(), llvm::User::getOperand(), llvm::ShuffleVectorInst::getType(), llvm::Type::getTypeID(), llvm::Type::IntegerTyID, llvm::Type::isVectorTy(), llvm_unreachable, and SetValue().
| void Interpreter::visitSIToFPInst | ( | SIToFPInst & | I | ) |
Definition at line 1685 of file Execution.cpp.
References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().
| void Interpreter::visitStoreInst | ( | StoreInst & | I | ) |
Definition at line 1050 of file Execution.cpp.
References llvm::dbgs(), llvm::User::getOperand(), llvm::StoreInst::getPointerOperand(), llvm::Value::getType(), llvm::GVTOP(), I, llvm::StoreInst::isVolatile(), PrintVolatile, and llvm::ExecutionEngine::StoreValueToMemory().
| void Interpreter::visitSwitchInst | ( | SwitchInst & | I | ) |
Definition at line 894 of file Execution.cpp.
References llvm::SwitchInst::case_begin(), llvm::SwitchInst::case_end(), executeICMP_EQ(), llvm::SwitchInst::getCondition(), llvm::SwitchInst::getDefaultDest(), llvm::Value::getType(), and llvm::GenericValue::IntVal.
| void Interpreter::visitTruncInst | ( | TruncInst & | I | ) |
Definition at line 1655 of file Execution.cpp.
References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().
| void Interpreter::visitUIToFPInst | ( | UIToFPInst & | I | ) |
Definition at line 1680 of file Execution.cpp.
References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().
| void Interpreter::visitUnreachableInst | ( | UnreachableInst & | I | ) |
Definition at line 877 of file Execution.cpp.
References llvm::report_fatal_error().
| void Interpreter::visitVAArgInst | ( | VAArgInst & | I | ) |
Definition at line 1718 of file Execution.cpp.
References llvm::dbgs(), llvm::Double, llvm::GenericValue::IntPair::first, llvm::Float, llvm::User::getOperand(), llvm::Value::getType(), llvm::Type::getTypeID(), IMPLEMENT_VAARG, llvm::Type::IntegerTyID, llvm::GenericValue::IntVal, llvm_unreachable, llvm::GenericValue::IntPair::second, SetValue(), and llvm::GenericValue::UIntPairVal.
| void Interpreter::visitZExtInst | ( | ZExtInst & | I | ) |
Definition at line 1665 of file Execution.cpp.
References llvm::User::getOperand(), llvm::Value::getType(), and SetValue().
1.8.6