14 #ifndef LLVM_LIB_EXECUTIONENGINE_INTERPRETER_INTERPRETER_H 15 #define LLVM_LIB_EXECUTIONENGINE_INTERPRETER_INTERPRETER_H 28 class IntrinsicLowering;
29 template<
typename T>
class generic_gep_type_iterator;
39 std::vector<void *> Allocations;
49 for (
void *Allocation : Allocations)
53 void add(
void *Mem) { Allocations.push_back(Mem); }
67 std::map<Value *, GenericValue>
Values;
82 std::vector<ExecutionContext> ECStack;
86 std::vector<Function*> AtExitHandlers;
95 void runAtExitHandlers();
104 std::string *ErrorStr =
nullptr);
112 bool AbortOnFailure =
true)
override {
180 AtExitHandlers.push_back(F);
184 return &(ECStack.back ().VarArgs[0]);
197 void *getPointerToFunction(
Function *F)
override {
return (
void*)
F; }
199 void initializeExecutionEngine() { }
200 void initializeExternalFunctions();
Return a value (possibly void), from a function.
generic_gep_type_iterator<> gep_type_iterator
std::vector< GenericValue > ValuePlaneTy
raw_ostream & errs()
This returns a reference to a raw_ostream for standard error.
Base class for instruction visitors.
This class represents lattice values for constants.
This class represents zero extension of integer types.
This class represents a function call, abstracting a target machine's calling convention.
BasicBlock::iterator CurInst
std::map< Value *, GenericValue > Values
This instruction constructs a fixed permutation of two input vectors.
This class represents a sign extension of integer types.
An instruction for reading from memory.
void visitCallInst(CallInst &I)
amdgpu Simplify well known AMD library false Value Value const Twine & Name
This class represents the LLVM 'select' instruction.
void visitInvokeInst(InvokeInst &I)
void * getPointerToNamedFunction(StringRef Name, bool AbortOnFailure=true) override
getPointerToNamedFunction - This method returns the address of the specified function by using the dl...
This class represents a cast from a pointer to an integer.
A constant value that is initialized with an expression using other constant values.
void visitPHINode(PHINode &PN)
This instruction compares its operands according to the predicate given to the constructor.
This class represents a no-op cast from one type to another.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
An instruction for storing to memory.
This class represents a cast from floating point to signed integer.
This class represents a truncation of integer types.
an instruction for type-safe pointer arithmetic to access elements of arrays and structs ...
This instruction inserts a single (scalar) element into a VectorType value.
LLVM Basic Block Representation.
The instances of the Type class are immutable: once they are created, they are never changed...
Conditional or Unconditional Branch instruction.
This function has undefined behavior.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
AllocaHolder & operator=(AllocaHolder &&RHS)=default
Indirect Branch Instruction.
This instruction compares its operands according to the predicate given to the constructor.
GenericValue * getFirstVarArg()
This class represents a cast from an integer to a pointer.
void visitInstruction(Instruction &I)
This class represents the va_arg llvm instruction, which returns an argument of the specified type gi...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Abstract interface for implementation execution of LLVM modules, designed to support both interpreter...
std::vector< GenericValue > VarArgs
This class represents a cast from floating point to unsigned integer.
InstListType::iterator iterator
Instruction iterators...
This class represents a cast unsigned integer to floating point.
This class represents a cast from signed integer to floating point.
This class represents a truncation of floating point types.
LLVM Value Representation.
void addAtExitHandler(Function *F)
StringRef - Represent a constant reference to a string, i.e.
This class represents an extension of floating point types.
an instruction to allocate memory on the stack
This instruction inserts a struct field of array element value into an aggregate value.