[PATCH] D105967: [TableGen] Allow isAllocatable inheritence from any superclass

Carl Ritson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 14 18:04:16 PDT 2021


critson updated this revision to Diff 358797.
critson marked an inline comment as done.
critson added a comment.

- Rework to use any_of


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105967

Files:
  llvm/utils/TableGen/CodeGenRegisters.cpp


Index: llvm/utils/TableGen/CodeGenRegisters.cpp
===================================================================
--- llvm/utils/TableGen/CodeGenRegisters.cpp
+++ llvm/utils/TableGen/CodeGenRegisters.cpp
@@ -833,7 +833,10 @@
   Namespace = Super.Namespace;
   VTs = Super.VTs;
   CopyCost = Super.CopyCost;
-  Allocatable = Super.Allocatable;
+  // Check for allocatable superclasses.
+  Allocatable = any_of(SuperClasses, [&](const CodeGenRegisterClass *S) {
+    return S->Allocatable;
+  });
   AltOrderSelect = Super.AltOrderSelect;
   AllocationPriority = Super.AllocationPriority;
   GeneratePressureSet |= Super.GeneratePressureSet;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105967.358797.patch
Type: text/x-patch
Size: 642 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210715/5052ea80/attachment.bin>


More information about the llvm-commits mailing list