[PATCH] D18573: [X86] Enable call frame optimization ("mov to push") not only for optsize (PR26325)

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 31 09:49:02 PDT 2016


hans added inline comments.

================
Comment at: llvm/trunk/test/CodeGen/X86/win32-seh-nested-finally.ll:56
@@ -53,2 +55,3 @@
 ; CHECK: calll _f
+; CHECK: addl $4, %esp
 ; CHECK: retl
----------------
mkuper wrote:
> joerg wrote:
> > Two things here for the updated patch. If the stack alignment requirement is 32bit only OR if the pushes have realigned the stack correctly (not sure if we care about the second part), the addls can be deferred to the end of the BB.
> > It's also cheaper to use a pop to some scratch register if available.
> Regarding the last part - we already have code for that in X86FrameLowering::eliminateCallFramePseudoInstr(), but it's also currently only enabled for minsize.
Using pop for more stack restores is PR26333.
Filed PR27165 for considering using pop for stack restore beyond -Os.

================
Comment at: llvm/trunk/test/CodeGen/X86/win32-seh-nested-finally.ll:62
@@ -58,3 +61,3 @@
 ; CHECK: addl $12, %ebp
-; CHECK: movl $2, (%esp)
+; CHECK: pushl $2
 ; CHECK: calll _f
----------------
joerg wrote:
> This and the next block is missing a pop still? Also, add looks strange and out of context for the rest of the purpose of the text case.
Adding more checks in r265027.

Are you saying add instead of pop looks out of place? See Michael's comment above. Or do you mean the "addl $12, %ebp" above?


Repository:
  rL LLVM

http://reviews.llvm.org/D18573





More information about the llvm-commits mailing list