forked from OSchip/llvm-project
AMDGPU: Change stack alignment
While the incoming stack for a kernel is 256-byte aligned, this refers to the base address of the entire wave. This isn't useful information for most of codegen. Fixes unnecessarily aligning stack objects in callees. llvm-svn: 300481
This commit is contained in:
parent
7769a0854e
commit
869fec278c
|
@ -415,9 +415,11 @@ public:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Scratch is allocated in 256 dword per wave blocks for the entire
|
||||||
|
// wavefront. When viewed from the perspecive of an arbitrary workitem, this
|
||||||
|
// is 4-byte aligned.
|
||||||
unsigned getStackAlignment() const {
|
unsigned getStackAlignment() const {
|
||||||
// Scratch is allocated in 256 dword per wave blocks.
|
return 4;
|
||||||
return 4 * 256 / getWavefrontSize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool enableMachineScheduler() const override {
|
bool enableMachineScheduler() const override {
|
||||||
|
|
Loading…
Reference in New Issue