Skip to content

Commit

Permalink
gen/dcompute/targetOCL.cpp: update target data layout for LLVM 19
Browse files Browse the repository at this point in the history
  • Loading branch information
liushuyu committed Nov 6, 2024
1 parent 677422e commit fd33a05
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gen/dcompute/targetOCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <string>

// from SPIRVInternal.h
#if LDC_LLVM_VER < 1900
#define SPIR_TARGETTRIPLE32 "spir-unknown-unknown"
#define SPIR_TARGETTRIPLE64 "spir64-unknown-unknown"
#define SPIR_DATALAYOUT32 \
Expand All @@ -38,6 +39,16 @@
"-v32:32:32-v48:64:64-v64:64:64-v96:128:128" \
"-v128:128:128-v192:256:256-v256:256:256" \
"-v512:512:512-v1024:1024:1024"
#else
#define SPIR_TARGETTRIPLE32 "spirv-unknown-unknown"
#define SPIR_TARGETTRIPLE64 "spirv64-unknown-unknown"
#define SPIR_DATALAYOUT32 \
"e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64" \
"-v96:128-v192:256-v256:256-v512:512-v1024:1024-G1"
#define SPIR_DATALAYOUT64 \
"e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128" \
"-v192:256-v256:256-v512:512-v1024:1024-G1"
#endif

using namespace dmd;

Expand Down

0 comments on commit fd33a05

Please sign in to comment.