diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-10-13 13:10:00 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-10-13 13:10:00 +0000 |
| commit | 253640e18dc816f9e1c71ad0db4015f0b869e081 (patch) | |
| tree | 05c7162e26681468a1629e9068b633da6b8c89a9 /llvm/lib/Target | |
| parent | 26b6dbc3696df980cf882df5b6d678b40b5d0d72 (diff) | |
| download | bcm5719-llvm-253640e18dc816f9e1c71ad0db4015f0b869e081.tar.gz bcm5719-llvm-253640e18dc816f9e1c71ad0db4015f0b869e081.zip | |
AMDGPU: Assume spilling will occur at -O0
Because everything live is spilled at the end of a
block by fast regalloc, assume this will happen and
avoid the copies of the resource descriptor.
llvm-svn: 284119
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/SIISelLowering.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp index dd6fb723261..7decb8f1c7f 100644 --- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp +++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp @@ -881,8 +881,12 @@ SDValue SITargetLowering::LowerFormalArguments( if (HasStackObjects) Info->setHasNonSpillStackObjects(true); + // Everything live out of a block is spilled with fast regalloc, so it's + // almost certain that spilling will be required. + if (getTargetMachine().getOptLevel() == CodeGenOpt::None) + HasStackObjects = true; + if (ST.isAmdCodeObjectV2()) { - // TODO: Assume we will spill without optimizations. if (HasStackObjects) { // If we have stack objects, we unquestionably need the private buffer // resource. For the Code Object V2 ABI, this will be the first 4 user |

