[PATCH] D33105: [AMDGPU] Turn register pressure estimation into forward tracker

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 12 10:58:13 PDT 2017


rampitec added inline comments.


================
Comment at: lib/Target/AMDGPU/GCNRegPressure.cpp:313-314
+
+  if (MI.isDebugValue())
+    return;
+
----------------
arsenm wrote:
> rampitec wrote:
> > arsenm wrote:
> > > Should this be using something like isTransient (as it is now looks inappropriate) to avoid IMPLICIT_DEF from impacting the pressure estimate?
> > I believe these defs should be accounted towards pressure. RA will finally allocate something for it, and in our case it is better to overestimate pressure rather than underestimate it. Anyway, this is not a functional change, it basically factors out an existing algorithm into a common interface. I do not want to change its behavior with this change.
> implicit_def will use whatever register is available, I think usually (always?) VGPR0, so it shouldn't count. Copy/phi is more questionable.
It may use available registers, but it will use them. If there were no registers available before, then at implicit def we will have an increase. It probably deserves some experiments, but shall be a separate change from the interface.


Repository:
  rL LLVM

https://reviews.llvm.org/D33105





More information about the llvm-commits mailing list