[PATCH] D110305: [TableGen] Allow targets to entirely ignore Psets for registers

Christudasan Devadasan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 22 22:24:24 PDT 2021


cdevadas created this revision.
cdevadas added reviewers: atrick, MatzeB, rampitec, arsenm.
Herald added a subscriber: tpr.
cdevadas requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

Tablegen currently expects targets to have at least one
pressure set for every broader register category. AMDGPU's
VGPR or AGPR, for instance, seemed to work correctly without
any pset, though we have forced one for each type to avoid
the assertion in `computeRegUnitSets`. This patch bypasses
the assertion for the classes when GeneratePressureSet is zero


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110305

Files:
  llvm/utils/TableGen/CodeGenRegisters.cpp


Index: llvm/utils/TableGen/CodeGenRegisters.cpp
===================================================================
--- llvm/utils/TableGen/CodeGenRegisters.cpp
+++ llvm/utils/TableGen/CodeGenRegisters.cpp
@@ -2025,7 +2025,8 @@
       }
     }
     LLVM_DEBUG(dbgs() << "\n");
-    assert(!RegClassUnitSets[RCIdx].empty() && "missing unit set for regclass");
+    assert((!RegClassUnitSets[RCIdx].empty() || !RC.GeneratePressureSet) &&
+           "missing unit set for regclass");
   }
 
   // For each register unit, ensure that we have the list of UnitSets that


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110305.374441.patch
Type: text/x-patch
Size: 565 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210923/420dc3d3/attachment.bin>


More information about the llvm-commits mailing list