[PATCH] D10826: Fix AArch64 prologue for empty frame with dynamic allocas
Kristof Beyls
kristof.beyls at arm.com
Fri Jul 10 14:05:29 PDT 2015
kristof.beyls added a comment.
I've only got two very minor suggestions for improvements.
With those improvements, LGTM!
================
Comment at: lib/Target/AArch64/AArch64FrameLowering.cpp:354-356
@@ -353,7 +353,5 @@
unsigned scratchSPReg = AArch64::SP;
- if (NeedsRealignment) {
- // Use the first callee-saved register as a scratch register
- assert(MF.getRegInfo().isPhysRegUsed(AArch64::X9) &&
- "No scratch register to align SP!");
+ if (NumBytes && NeedsRealignment) {
scratchSPReg = AArch64::X9;
+ MF.getRegInfo().setPhysRegUsed(scratchSPReg);
}
----------------
I'd keep the comment
// Use the first callee-saved register as a scratch register
otherwise looks ok.
================
Comment at: test/CodeGen/AArch64/aarch64-dynamic-stack-layout.ll:525-526
@@ +524,4 @@
+; Extra realignment in the prologue (performance issue).
+; X19 is used as a scratch register for SP realignment before it is assigned the
+; base pointer.
+; CHECK: sub x9, sp, #32 // =32
----------------
This comment isn't correct anymore in the newest version of the patch. I would just remove the comment.
http://reviews.llvm.org/D10826
More information about the llvm-commits
mailing list