forked from OSchip/llvm-project
AMDGPU: Add assert for GDS globals
This commit is contained in:
parent
af21445ea8
commit
1900b6c77b
|
@ -68,6 +68,9 @@ unsigned AMDGPUMachineFunction::allocateLDSGlobal(const DataLayout &DL,
|
||||||
// memory.
|
// memory.
|
||||||
LDSSize = alignTo(StaticLDSSize, DynLDSAlign);
|
LDSSize = alignTo(StaticLDSSize, DynLDSAlign);
|
||||||
} else {
|
} else {
|
||||||
|
assert(GV.getAddressSpace() == AMDGPUAS::REGION_ADDRESS &&
|
||||||
|
"expected region address space");
|
||||||
|
|
||||||
Offset = StaticGDSSize = alignTo(StaticGDSSize, Alignment);
|
Offset = StaticGDSSize = alignTo(StaticGDSSize, Alignment);
|
||||||
StaticGDSSize += DL.getTypeAllocSize(GV.getValueType());
|
StaticGDSSize += DL.getTypeAllocSize(GV.getValueType());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue