[PATCH] D12824: [x86][WIP] CSR alignment, dead code?

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 18:32:31 PDT 2015


reames created this revision.
reames added a subscriber: llvm-commits.

Fair warning: I'm touching code I'm not familiar with.  My approach might be completely wrong here.  

As far as I can tell, the line in question has no effect on runs with realignment enabled; the alignment of the spill slots is already handled within the MachineFrameInfo::CreateFixedSpillSlot.

With realignment disabled (via no-realign-stack), this appears to bypass the checking in MFI which prevents the stack alignment from being increased for CSRs.  What I'm really not clear on is why this doesn't trip the assert in ensureMaxAlignment.  Help?

(To exercise this code, you have to disable fp elimination.  Anyone know why we unconditional realign with a FP and ignore it otherwise?  I don't see any profitability decision being made...)

http://reviews.llvm.org/D12824

Files:
  lib/Target/X86/X86FrameLowering.cpp

Index: lib/Target/X86/X86FrameLowering.cpp
===================================================================
--- lib/Target/X86/X86FrameLowering.cpp
+++ lib/Target/X86/X86FrameLowering.cpp
@@ -1343,7 +1343,6 @@
     int SlotIndex =
         MFI->CreateFixedSpillStackObject(RC->getSize(), SpillSlotOffset);
     CSI[i - 1].setFrameIdx(SlotIndex);
-    MFI->ensureMaxAlignment(RC->getAlignment());
   }
 
   return true;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12824.34611.patch
Type: text/x-patch
Size: 422 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150912/0473c14f/attachment.bin>


More information about the llvm-commits mailing list