[PATCH] D29798: [AMDGPU] Override PSet for M0

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 17:01:38 PST 2017


rampitec marked 3 inline comments as done.
rampitec added inline comments.


================
Comment at: lib/Target/AMDGPU/SIRegisterInfo.cpp:1336-1337
+
+  if (hasRegUnit(AMDGPU::M0, RegUnit))
+    return Empty;
+  return AMDGPURegisterInfo::getRegUnitPressureSets(RegUnit);
----------------
arsenm wrote:
> rampitec wrote:
> > arsenm wrote:
> > > Is == M0 sufficient? m0 should be its own regunit since it can't be a subregister
> > Yes, it is in its own RegUnit, and RegUnit is what we get here. This test yields true for M0 and only for M0 because it does not share a RegUnit with any other register.
> I mean it's simpler to do just return RegUnit == AMDGPU::M0 instead of doing the whole regunit iterator test
AMDGPU::M0 == 89, its RegUnit == 81.


Repository:
  rL LLVM

https://reviews.llvm.org/D29798





More information about the llvm-commits mailing list