summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2018-03-29 20:22:04 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2018-03-29 20:22:04 +0000
commitffb132e74b26213ed3df4378c0de3128d9060aad (patch)
treeae6994b2c3087b8bcab722f56aa503849fd791fc /llvm/lib
parentd9911f6f7baca75a9d51352bf9ef3718ee05cd82 (diff)
downloadbcm5719-llvm-ffb132e74b26213ed3df4378c0de3128d9060aad.tar.gz
bcm5719-llvm-ffb132e74b26213ed3df4378c0de3128d9060aad.zip
AMDGPU: Increase default stack alignment
8 and 16-byte values are common, so increase the default alignment to avoid realigning the stack in most functions. llvm-svn: 328821
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
index 6312bb02feb..a7e52cb16c9 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
@@ -550,8 +550,13 @@ public:
// 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.
+ //
+ // Only 4-byte alignment is really needed to access anything. Transformations
+ // on the pointer value itself may rely on the alignment / known low bits of
+ // the pointer. Set this to something above the minimum to avoid needing
+ // dynamic realignment in common cases.
unsigned getStackAlignment() const {
- return 4;
+ return 16;
}
bool enableMachineScheduler() const override {
OpenPOWER on IntegriCloud