[PATCH] D18627: [X86] Merge adjacent stack adjustments in eliminateCallFramePseudoInstr (PR27140)

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 17:28:41 PDT 2016


hans marked 2 inline comments as done.

================
Comment at: lib/Target/X86/X86FrameLowering.cpp:2561
@@ -2552,3 +2560,3 @@
       // it to be more precise.
-      int CFAOffset = Amount;
+      int CFAOffset = -Amount;
       // TODO: When not using precise CFA, we also need to adjust for the
----------------
rnk wrote:
> How did mergeSPUpdates change the sign here?
It doesn't. What's changed is that now the Amount can change above, due to the merging, and that also needs to feed into the CFAOffset.

I figured it was simpler to just spell out that CFAOffset is the opposite of the stack adjustment.

Actually, let me see if I can make this a bit more clear in a new patch..


http://reviews.llvm.org/D18627





More information about the llvm-commits mailing list