[PATCH] D117253: [AMDGPU] Select VGPR versions of MFMA if possible

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 17 16:58:27 PST 2022


rampitec added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp:103
+
+    if (ST.hasGFX90AInsts() && !HasCalls &&
+        ST.getMaxNumVGPRs(F) <= AMDGPU::VGPR_32RegClass.getNumRegs() &&
----------------
arsenm wrote:
> rampitec wrote:
> > arsenm wrote:
> > > Relying on the calls check here is unreliable. Since you only really need to query this before selection, can't we just see when an asm statement containing AGPRs is hit?
> > This function already relyies on this. Then it is not sufficient to check for asm, as a called function may use agprs.
> I know it does, and it's not good. Unlike the current use case for checking for calls, you don't need to know this up-front for the ABI so you don't have to stick this here
I could add a check for calls where I am checking asm. The scan is there anyway. Is that better?

There must be no calls for this to be legal. 


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

https://reviews.llvm.org/D117253



More information about the llvm-commits mailing list