diff options
author | Reid Kleckner <rnk@google.com> | 2017-03-17 20:25:49 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2017-03-17 20:25:49 +0000 |
commit | edf1cbb5800419e06ee823d4a7f0896511f9ff25 (patch) | |
tree | 8efec24aecb38f150859a5acb13e8ce1c4434902 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 661ffe104ea1661df6008bdb51f38368c7bbd5d2 (diff) | |
download | llvm-edf1cbb5800419e06ee823d4a7f0896511f9ff25.zip llvm-edf1cbb5800419e06ee823d4a7f0896511f9ff25.tar.gz llvm-edf1cbb5800419e06ee823d4a7f0896511f9ff25.tar.bz2 |
[X86] Emit fewer instructions to allocate >16GB stack frames
Summary:
Use this code pattern when RAX is live, instead of emitting up to 2
billion adjustments:
pushq %rax
movabsq +-$Offset+-8, %rax
addq %rsp, %rax
xchg %rax, (%rsp)
movq (%rsp), %rsp
Try to clean this code up a bit while I'm here. In particular, hoist the
logic that handles the entire adjustment with `movabsq $imm, %rax` out
of the loop.
This negates the offset in the prologue and uses ADD because X86 only
has a two operand subtract which always subtracts from the destination
register, which can no longer be RSP.
Fixes PR31962
Reviewers: majnemer, sdardis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D30052
llvm-svn: 298116
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions