[PATCH] D18246: X86: Use push-pop for materializing 8-bit immediates for minsize (take 2)

David Kreitzer via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 09:07:58 PDT 2016


DavidKreitzer added a comment.

FWIW, here is a link to the change set for the original commit of the push/pop optimization: http://reviews.llvm.org/D15549. I just diffed that patch against this new one for the purpose of easier review.


================
Comment at: lib/Target/X86/X86InstrInfo.cpp:5369
@@ +5368,3 @@
+    MachineFrameInfo *MFI = MBB.getParent()->getFrameInfo();
+    if (!(Fn->hasFnAttribute(Attribute::NoRedZone) || MFI->adjustsStack() ||
+          IsWin64CC)) {
----------------
This code runs after the red-zone decision has been made, right? Would it be better to capture that decision as part of the MFI and do a more accurate "uses red zone" check here?

If you agree but don't want to make that change now, a FIXME comment would be helpful.


http://reviews.llvm.org/D18246





More information about the llvm-commits mailing list