summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-06-15 05:35:14 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-06-15 05:35:14 +0000
commit0272be206a0d1369736dfee456bfa7430ccd5e02 (patch)
tree8ee9fd669e93d8a2c7b16053d8ff5f28fb317676 /llvm/lib/CodeGen/AsmPrinter
parentbc85ec86560649dc9eeb923dc45ecdedb3f54bbd (diff)
downloadbcm5719-llvm-0272be206a0d1369736dfee456bfa7430ccd5e02.tar.gz
bcm5719-llvm-0272be206a0d1369736dfee456bfa7430ccd5e02.zip
Don't force SP-relative addressing for statepoints
Summary: ... when the offset is not statically known. Prioritize addresses relative to the stack pointer in the stackmap, but fallback gracefully to other modes of addressing if the offset to the stack pointer is not a known constant. Patch by Oscar Blumberg! Reviewers: sanjoy Subscribers: llvm-commits, majnemer, rnk, sanjoy, thanm Differential Revision: http://reviews.llvm.org/D21259 llvm-svn: 272756
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/WinException.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/WinException.cpp b/llvm/lib/CodeGen/AsmPrinter/WinException.cpp
index 478396556d2..083aacb3fc5 100644
--- a/llvm/lib/CodeGen/AsmPrinter/WinException.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/WinException.cpp
@@ -302,7 +302,8 @@ int WinException::getFrameIndexOffset(int FrameIndex,
const TargetFrameLowering &TFI = *Asm->MF->getSubtarget().getFrameLowering();
unsigned UnusedReg;
if (Asm->MAI->usesWindowsCFI())
- return TFI.getFrameIndexReferenceFromSP(*Asm->MF, FrameIndex, UnusedReg);
+ return *TFI.getFrameIndexReferenceFromSP(*Asm->MF, FrameIndex, UnusedReg,
+ /*AllowSPAdjustment*/ true);
// For 32-bit, offsets should be relative to the end of the EH registration
// node. For 64-bit, it's relative to SP at the end of the prologue.
assert(FuncInfo.EHRegNodeEndOffset != INT_MAX);
OpenPOWER on IntegriCloud