[PATCH] D26932: AMDGPU: Improve frame index folding for pre-allocated objects

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 21 13:40:32 PST 2016


arsenm created this revision.
arsenm added a subscriber: llvm-commits.
Herald added a reviewer: tstellarAMD.
Herald added subscribers: tony-tye, yaxunl, nhaehnle, wdng, kzhuravl.

If the LocalStackSlotAlloction pass has already fixed the offset
for the object during operand folding, check if the offset is an
inline immediate.

      

There are a couple remaining issues separate from this patch
that need to be corrected before this can be committed.
LocalStackSlotAlloctation decides if it didn't need to put any
frame base registers in that it shouldn't create the pre-allocated
area, so no offsets are known.

      

Additionally there are code regressions when the base frame index
is folded into an instruction at the expensive of the offset.
e.g. an add fi, offset folds the frame index instead of the single
use offset, instead of materializing the frame index which is re-used
in multiple instructions.


https://reviews.llvm.org/D26932

Files:
  lib/Target/AMDGPU/SIFoldOperands.cpp
  lib/Target/AMDGPU/SIInstrInfo.cpp
  lib/Target/AMDGPU/SIInstrInfo.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26932.78774.patch
Type: text/x-patch
Size: 4043 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161121/7d20d35d/attachment.bin>


More information about the llvm-commits mailing list