[PATCH] D78811: [AMDGPU] Enable base pointer.

Christudasan Devadasan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 8 13:26:05 PDT 2020


cdevadas marked an inline comment as done.
cdevadas added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp:118
+  // stack pointer, so we reserve a base pointer.
+  return needsStackRealignment(MF);
+}
----------------
arsenm wrote:
> cdevadas wrote:
> > scott.linder wrote:
> > > Is it possible to have some mechanism for only setting up the BP when it is actually used? Looking at X86 it seems like they don't do this, so I am OK with us not doing it either, just wondering if it is feasible.
> > It sounds good to me. We can enable it only when there is a fixed-frame. 
> > It can be easily done with an additional check, MFI.getNumFixedObjects() != 0
> I think getNumFixedObjects is not the right check here. That won't deal with the case where we have dead stack objects (as is common from eliminated SGPR spils)
It would be good to have a straight forward check here to see if there is any fixed-frame and getNumFixedObjects would do that.

 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78811/new/

https://reviews.llvm.org/D78811





More information about the llvm-commits mailing list