[PATCH] D14360: [AArch64] Enable shrink-wrapping by default
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 4 16:54:01 PST 2015
qcolombet created this revision.
qcolombet added reviewers: t.p.northover, mcrosier.
qcolombet added a subscriber: llvm-commits.
qcolombet set the repository for this revision to rL LLVM.
Herald added subscribers: rengolin, aemerson.
Hi,
This is the AArch64 version of enable shrink-wrapping by default, but since copy/paste are cheap, here is a longer description :).
This patch enables shrink-wrapping by default for AArch64.
I have tested shrink-wrapping and no correctness problems came out or runtime regressions.
Although the gain may be small, the code looks nicer with shrink-wrapping enabled and the performance could just be better.
For the record shrink-wrapping was introduced after this review:
http://reviews.llvm.org/D9210
More information on Shrink-Wrapping:
http://lists.llvm.org/pipermail/llvm-dev/2015-May/085220.html
OK to commit?
Thanks,
-Quentin
Repository:
rL LLVM
http://reviews.llvm.org/D14360
Files:
lib/Target/AArch64/AArch64FrameLowering.h
test/CodeGen/AArch64/aarch64-dynamic-stack-layout.ll
Index: lib/Target/AArch64/AArch64FrameLowering.h
===================================================================
--- lib/Target/AArch64/AArch64FrameLowering.h
+++ lib/Target/AArch64/AArch64FrameLowering.h
@@ -60,6 +60,11 @@
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
RegScavenger *RS) const override;
+
+ /// Returns true if the target will correctly handle shrink wrapping.
+ bool enableShrinkWrapping(const MachineFunction &MF) const override {
+ return true;
+ }
};
} // End llvm namespace
Index: test/CodeGen/AArch64/aarch64-dynamic-stack-layout.ll
===================================================================
--- test/CodeGen/AArch64/aarch64-dynamic-stack-layout.ll
+++ test/CodeGen/AArch64/aarch64-dynamic-stack-layout.ll
@@ -522,10 +522,10 @@
; CHECK-LABEL: realign_conditional2
; Extra realignment in the prologue (performance issue).
+; CHECK: tbz {{.*}} .[[LABEL:.*]]
; CHECK: sub x9, sp, #32 // =32
; CHECK: and sp, x9, #0xffffffffffffffe0
; CHECK: mov x19, sp
-; CHECK: tbz {{.*}} .[[LABEL:.*]]
; Stack is realigned in a non-entry BB.
; CHECK: sub [[REG:x[01-9]+]], sp, #64
; CHECK: and sp, [[REG]], #0xffffffffffffffe0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14360.39292.patch
Type: text/x-patch
Size: 1249 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151105/2e827f19/attachment.bin>
More information about the llvm-commits
mailing list