[llvm] r273448 - AMDGPU: Make FrameLowering stack alignment 16
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 22 10:47:39 PDT 2016
Author: arsenm
Date: Wed Jun 22 12:47:39 2016
New Revision: 273448
URL: http://llvm.org/viewvc/llvm-project?rev=273448&view=rev
Log:
AMDGPU: Make FrameLowering stack alignment 16
We don't need it to be that high. The natural alignment
for a single workitem's stack is 16.
Modified:
llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.cpp?rev=273448&r1=273447&r2=273448&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.cpp Wed Jun 22 12:47:39 2016
@@ -107,7 +107,8 @@ AMDGPUSubtarget::AMDGPUSubtarget(const T
initializeSubtargetDependencies(TT, GPU, FS);
- const unsigned MaxStackAlign = 64 * 16; // Maximum stack alignment (long16)
+ // Scratch is allocated in 256 dword per wave blocks.
+ const unsigned StackAlign = 4 * 256 / getWavefrontSize();
if (getGeneration() <= AMDGPUSubtarget::NORTHERN_ISLANDS) {
InstrInfo.reset(new R600InstrInfo(*this));
@@ -116,14 +117,14 @@ AMDGPUSubtarget::AMDGPUSubtarget(const T
// FIXME: Should have R600 specific FrameLowering
FrameLowering.reset(new AMDGPUFrameLowering(
TargetFrameLowering::StackGrowsUp,
- MaxStackAlign,
+ StackAlign,
0));
} else {
InstrInfo.reset(new SIInstrInfo(*this));
TLInfo.reset(new SITargetLowering(TM, *this));
FrameLowering.reset(new SIFrameLowering(
TargetFrameLowering::StackGrowsUp,
- MaxStackAlign,
+ StackAlign,
0));
#ifndef LLVM_BUILD_GLOBAL_ISEL
GISelAccessor *GISel = new GISelAccessor();
More information about the llvm-commits
mailing list