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

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 27 09:52:51 PST 2022


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


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp:4258
+      const SIMachineFunctionInfo *Info = MF.getInfo<SIMachineFunctionInfo>();
+      OpdsMapping[0] =
+          Info->mayNeedAGPRs()
----------------
arsenm wrote:
> Doesn't this need a subtarget check?
It is in the mayNeedAGPRs() itself.


================
Comment at: llvm/lib/Target/AMDGPU/VOP3PInstructions.td:448
+class AgprMAIFrag<SDPatternOperator Op> :
+  MAIFrag<Op, [{ return MF->getInfo<SIMachineFunctionInfo>()->mayNeedAGPRs(); }]>;
+
----------------
arsenm wrote:
> The point of checking it here is you don't need to inspect the original IR. You can check if there are any AGPR uses in the machine function
This is selection, there MF is not yet selected. Plus it needs a check for calls.


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

https://reviews.llvm.org/D117253



More information about the llvm-commits mailing list