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

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 16:58:20 PDT 2016


rnk added inline comments.

================
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
----------------
How did mergeSPUpdates change the sign here?

================
Comment at: test/CodeGen/X86/force-align-stack-alloca.ll:36
@@ -36,2 +35,3 @@
+; Next we set up the memset call.
 ; CHECK:      subl   $20, %esp
 ; CHECK-NOT:         {{[^ ,]*}}, %esp
----------------
can you check for 3x pushl here to make it clear that we're allocating 32 bytes of stack?

================
Comment at: test/CodeGen/X86/force-align-stack-alloca.ll:39
@@ -38,3 +38,3 @@
 ; CHECK:      calll  memset
-; CHECK-NEXT: addl   $32, %esp
+; CHECK-NEXT: addl   $4, %esp
 ; CHECK-NOT:         {{[^ ,]*}}, %esp
----------------
Add a comment about why 4? (deallocate 32 bytes of outgoing callframe for memset, allocate 28 for f)


http://reviews.llvm.org/D18627





More information about the llvm-commits mailing list