aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SafeStack.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-06-16 18:54:06 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-06-16 18:54:06 +0000
commit0ebc9616b4045284168a2be5a8162502eecc8e5e (patch)
tree093c2c3fa6e52dfd46a312e01db5592f1a94c3d1 /llvm/lib/CodeGen/SafeStack.cpp
parentb9d28fbeb36e1d20dfb4523757de51256751b75d (diff)
downloadllvm-0ebc9616b4045284168a2be5a8162502eecc8e5e.zip
llvm-0ebc9616b4045284168a2be5a8162502eecc8e5e.tar.gz
llvm-0ebc9616b4045284168a2be5a8162502eecc8e5e.tar.bz2
NFC; refactor getFrameIndexReferenceFromSP
Summary: ... into getFrameIndexReferencePreferSP. This change folds the fail-then-retry logic into getFrameIndexReferencePreferSP. There is a non-functional but behaviorial change in WinException -- earlier if `getFrameIndexReferenceFromSP` failed we'd trip an assert, but now we'll silently use the (wrong) offset from the base pointer. I could not write the assert I'd like to write ("FrameReg == StackRegister", like I've done in X86FrameLowering) since there is no easy way to get to the stack register from WinException (happy to be proven wrong here). One solution to this is to add a `bool OnlyStackPointer` parameter to `getFrameIndexReferenceFromSP` that asserts if it could not satisfy its promise of returning an offset from a stack pointer, but that seems overkill. Reviewers: rnk Subscribers: sanjoy, mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D21427 llvm-svn: 272938
Diffstat (limited to 'llvm/lib/CodeGen/SafeStack.cpp')
0 files changed, 0 insertions, 0 deletions