[llvm] [SPIRV] Change how to detect OpenCL/Vulkan Env and update tests accordingly. (PR #129689)
Dmitry Sidorov via llvm-commits
llvm-commits at lists.llvm.org
Thu May 15 09:33:12 PDT 2025
================
@@ -78,14 +83,22 @@ class SPIRVSubtarget : public SPIRVGenSubtargetInfo {
unsigned getPointerSize() const { return PointerSize; }
unsigned getBound() const { return GR->getBound(); }
bool canDirectlyComparePointers() const;
- // TODO: this environment is not implemented in Triple, we need to decide
- // how to standardize its support. For now, let's assume SPIR-V with physical
- // addressing is OpenCL, and Logical addressing is Vulkan.
- bool isOpenCLEnv() const {
+ void setEnv(SPIRVEnvType E) {
+ assert(E != Unknown && "Unknown environment is not allowed");
----------------
MrSidims wrote:
Is it really a development assumption? If not - it should be a proper error, that llc use would see.
https://github.com/llvm/llvm-project/pull/129689
More information about the llvm-commits
mailing list