Skip to content

Commit eacd870

Browse files
Revert "[CI] Drop DPCPP_ENABLE_OPAQUE_POINTERS cmake flag (#8286)"
This reverts commit 130466e.
1 parent 7f737b4 commit eacd870

File tree

6 files changed

+4
-17
lines changed

6 files changed

+4
-17
lines changed

.github/workflows/sycl_nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
build_cache_root: "/__w/"
4848
build_cache_suffix: opaque_pointers
4949
build_artifact_suffix: opaque_pointers
50-
build_configure_extra_args: "--hip --cuda --enable-esimd-emulator --cmake-opt=-DSPIRV_ENABLE_OPAQUE_POINTERS=TRUE"
50+
build_configure_extra_args: "--hip --cuda --enable-esimd-emulator --cmake-opt=-DDPCPP_ENABLE_OPAQUE_POINTERS=TRUE --cmake-opt=-DSPIRV_ENABLE_OPAQUE_POINTERS=TRUE"
5151

5252
ubuntu2204_opaque_pointers_build_test:
5353
if: github.repository == 'intel/llvm'
@@ -58,7 +58,7 @@ jobs:
5858
build_cache_root: "/__w/"
5959
build_cache_suffix: opaque_pointers
6060
build_artifact_suffix: opaque_pointers
61-
build_configure_extra_args: "--hip --cuda --enable-esimd-emulator --cmake-opt=-DSPIRV_ENABLE_OPAQUE_POINTERS=TRUE"
61+
build_configure_extra_args: "--hip --cuda --enable-esimd-emulator --cmake-opt=-DDPCPP_ENABLE_OPAQUE_POINTERS=TRUE --cmake-opt=-DSPIRV_ENABLE_OPAQUE_POINTERS=TRUE"
6262
build_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest"
6363

6464
windows_default:

libclc/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,12 +381,6 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
381381
# have to be explicity declared in the soruce.
382382
list( APPEND flags -Xclang -fdeclare-spirv-builtins)
383383

384-
if(NOT SPIRV_ENABLE_OPAQUE_POINTERS)
385-
list(APPEND flags "-UENABLE_OPAQUE_POINTERS")
386-
list(APPEND flags "SHELL:-Xclang -no-opaque-pointers")
387-
list(APPEND opt_flags "-opaque-pointers=0")
388-
endif()
389-
390384
# OpenCL 3.0 extensions
391385
list( APPEND flags -cl-std=CL3.0 "SHELL:-Xclang" )
392386
string(CONCAT CL_3_0_EXTENSIONS

libclc/utils/libclc-remangler/LibclcRemangler.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -779,11 +779,6 @@ class LibCLCRemangler : public ASTConsumer {
779779
void Initialize(ASTContext &C) override {
780780
ASTCtx = &C;
781781
SMDiagnostic Err;
782-
#if SPIRV_ENABLE_OPAQUE_POINTERS
783-
LLVMCtx.setOpaquePointers(true);
784-
#else
785-
LLVMCtx.setOpaquePointers(false);
786-
#endif
787782
std::unique_ptr<MemoryBuffer> const Buff = ExitOnErr(
788783
errorOrToExpected(MemoryBuffer::getFileOrSTDIN(InputIRFilename)));
789784
std::unique_ptr<llvm::Module> const M =

llvm-spirv/tools/llvm-spirv/llvm-spirv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static cl::opt<bool>
154154
SPIRVToolsDis("spirv-tools-dis", cl::init(false),
155155
cl::desc("Emit textual assembly using SPIRV-Tools"));
156156

157-
#if SPIRV_ENABLE_OPAQUE_POINTERS
157+
#if ENABLE_OPAQUE_POINTERS
158158
constexpr static bool SPIRVOpaquePointersDefault = true;
159159
#else
160160
constexpr static bool SPIRVOpaquePointersDefault = false;

llvm/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ if(NOT LLVM_ENABLE_NEW_PASS_MANAGER)
890890
" no longer supported.")
891891
endif()
892892

893-
set(DPCPP_ENABLE_OPAQUE_POINTERS TRUE CACHE BOOL
893+
set(DPCPP_ENABLE_OPAQUE_POINTERS FALSE CACHE BOOL
894894
"Enable opaque pointers by default.")
895895
if (DPCPP_ENABLE_OPAQUE_POINTERS)
896896
add_definitions("-DENABLE_OPAQUE_POINTERS=1")

llvm/lib/Bitcode/Reader/BitcodeReader.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2355,8 +2355,6 @@ Error BitcodeReader::parseTypeTableBody() {
23552355
// [pointee type, address space]
23562356
if (Record.empty())
23572357
return error("Invalid pointer record");
2358-
if (LLVM_UNLIKELY(!Context.hasSetOpaquePointersValue()))
2359-
Context.setOpaquePointers(false);
23602358
unsigned AddressSpace = 0;
23612359
if (Record.size() == 2)
23622360
AddressSpace = Record[1];

0 commit comments

Comments
 (0)