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

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 31 09:15:51 PDT 2016


mkuper added a comment.

Thanks a lot, Hans!
I apologize for not making this happen myself - never got to it, and then lost the ability to benchmark...


================
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
----------------
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.


Repository:
  rL LLVM

http://reviews.llvm.org/D18573





More information about the llvm-commits mailing list