Skip to content

Commit a2614ef

Browse files
authored
[OpenCL] Update Interpreter to support OpenCL CPU test (#7979)
We will revert this change once we resolve the dependency on NEAT.
1 parent dfaa1c5 commit a2614ef

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,9 @@ add_llvm_component_library(LLVMInterpreter
1616
if( LLVM_ENABLE_FFI )
1717
target_link_libraries( LLVMInterpreter PRIVATE FFI::ffi )
1818
endif()
19+
20+
configure_file(
21+
Interpreter.h
22+
${LLVM_BINARY_DIR}/include/llvm/ExecutionEngine/Interpreter/Interpreter.h)
23+
24+
install(FILES Interpreter.h DESTINATION include/llvm/ExecutionEngine/Interpreter)

llvm/lib/ExecutionEngine/Interpreter/Interpreter.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ struct ExecutionContext {
7272
// Interpreter - This class represents the entirety of the interpreter.
7373
//
7474
class Interpreter : public ExecutionEngine, public InstVisitor<Interpreter> {
75+
protected:
7576
GenericValue ExitValue; // The return value of the called function
7677
IntrinsicLowering *IL;
7778

@@ -199,7 +200,11 @@ class Interpreter : public ExecutionEngine, public InstVisitor<Interpreter> {
199200
void initializeExecutionEngine() { }
200201
void initializeExternalFunctions();
201202
GenericValue getConstantExprValue(ConstantExpr *CE, ExecutionContext &SF);
203+
204+
protected:
202205
GenericValue getOperandValue(Value *V, ExecutionContext &SF);
206+
207+
private:
203208
GenericValue executeTruncInst(Value *SrcVal, Type *DstTy,
204209
ExecutionContext &SF);
205210
GenericValue executeSExtInst(Value *SrcVal, Type *DstTy,

0 commit comments

Comments
 (0)