We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bccb7f commit b14f1e5Copy full SHA for b14f1e5
llvm/lib/Target/SPIRV/SPIRVPrepareGlobals.cpp
@@ -12,6 +12,7 @@
12
//===----------------------------------------------------------------------===//
13
14
#include "SPIRV.h"
15
+#include "SPIRVUtils.h"
16
17
#include "llvm/ADT/STLExtras.h"
18
#include "llvm/IR/Module.h"
@@ -45,7 +46,8 @@ bool tryExtendLLVMBitcodeMarker(GlobalVariable &Bitcode) {
45
46
}
47
48
bool tryExtendDynamicLDSGlobal(GlobalVariable &GV) {
- constexpr unsigned WorkgroupAS = 3;
49
+ constexpr unsigned WorkgroupAS =
50
+ storageClassToAddressSpace(SPIRV::StorageClass::Workgroup);
51
const bool IsWorkgroupExternal =
52
GV.hasExternalLinkage() && GV.getAddressSpace() == WorkgroupAS;
53
if (!IsWorkgroupExternal)
0 commit comments