Skip to content

Commit 92a436d

Browse files
committed
[Review] use storageClassToAddressSpace(SPIRV::StorageClass::Workgroup);
1 parent 0376c3e commit 92a436d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Target/SPIRV/SPIRVPrepareGlobals.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
//===----------------------------------------------------------------------===//
1313

1414
#include "SPIRV.h"
15+
#include "SPIRVUtils.h"
1516

1617
#include "llvm/ADT/STLExtras.h"
1718
#include "llvm/IR/Module.h"
@@ -45,7 +46,8 @@ bool tryExtendLLVMBitcodeMarker(GlobalVariable &Bitcode) {
4546
}
4647

4748
bool tryExtendDynamicLDSGlobal(GlobalVariable &GV) {
48-
constexpr unsigned WorkgroupAS = 3;
49+
constexpr unsigned WorkgroupAS =
50+
storageClassToAddressSpace(SPIRV::StorageClass::Workgroup);
4951
const bool IsWorkgroupExternal =
5052
GV.hasExternalLinkage() && GV.getAddressSpace() == WorkgroupAS;
5153
if (!IsWorkgroupExternal)

0 commit comments

Comments
 (0)