[PATCH] D138340: [TableGen] Let -register-info-debug dump Offset/Size for each SubRegIndex
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 20 11:52:42 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa6cb924abcd8: [TableGen] Let -register-info-debug dump Offset/Size for each SubRegIndex (authored by bjope).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138340/new/
https://reviews.llvm.org/D138340
Files:
llvm/test/TableGen/ConcatenatedSubregs.td
llvm/utils/TableGen/RegisterInfoEmitter.cpp
Index: llvm/utils/TableGen/RegisterInfoEmitter.cpp
===================================================================
--- llvm/utils/TableGen/RegisterInfoEmitter.cpp
+++ llvm/utils/TableGen/RegisterInfoEmitter.cpp
@@ -1836,6 +1836,7 @@
OS << "SubRegIndex " << SRI.getName() << ":\n";
OS << "\tLaneMask: " << PrintLaneMask(SRI.LaneMask) << '\n';
OS << "\tAllSuperRegsCovered: " << SRI.AllSuperRegsCovered << '\n';
+ OS << "\tOffset, Size: " << SRI.Offset << ", " << SRI.Size << '\n';
}
for (const CodeGenRegister &R : RegBank.getRegisters()) {
Index: llvm/test/TableGen/ConcatenatedSubregs.td
===================================================================
--- llvm/test/TableGen/ConcatenatedSubregs.td
+++ llvm/test/TableGen/ConcatenatedSubregs.td
@@ -23,7 +23,7 @@
def sub1 : SubRegIndex<32, 32>;
def sub2 : SubRegIndex<32, 64>;
-def ssub0 : SubRegIndex<16>;
+def ssub0 : SubRegIndex<-1>;
def ssub1 : SubRegIndex<16, 16>;
def ssub2 : ComposedSubRegIndex<sub1, ssub0>;
def ssub3 : ComposedSubRegIndex<sub1, ssub1>;
@@ -57,6 +57,7 @@
def D6 : MyReg<"d6", [S12, S13]>;
def D7 : MyReg<"d7", [S14, S15]>;
}
+
def DRegs : MyClass<32, [i32], (sequence "D%u", 0, 7)>;
def Dtup2regs : RegisterTuples<[sub0, sub1],
@@ -88,14 +89,20 @@
// CHECK: Regs: D0 D1 D2 D3 D4 D5 D6 D7 S1_S2 S3_S4 S5_S6 S7_S8 S9_S10 S11_S12 S13_S14
// CHECK-LABEL: RegisterClass DRegs:
+// CHECK-LABEL: SubRegIndex ssub1:
+// CHECK: Offset, Size: 16, 16
// CHECK-LABEL: SubRegIndex sub0:
// CHECK-LABEL: SubRegIndex sub1:
// CHECK-LABEL: SubRegIndex sub2:
// Check inferred indexes:
-// CHECK: SubRegIndex ssub1_ssub2:
-// CHECK: SubRegIndex ssub3_ssub4:
-// CHECK: SubRegIndex ssub0_ssub1_ssub2_ssub3:
-// CHECK: SubRegIndex ssub1_ssub2_ssub3_ssub4:
+// CHECK-LABEL: SubRegIndex ssub1_ssub2:
+// FIXME: Size should be unknown (65535).
+// CHECK: Offset, Size: 16, 15
+// CHECK-LABEL: SubRegIndex ssub3_ssub4:
+// CHECK-LABEL: SubRegIndex ssub0_ssub1_ssub2_ssub3:
+// FIXME: Size should be unknown (65535).
+// CHECK: Offset, Size: 65535, 30
+// CHECK-LABEL: SubRegIndex ssub1_ssub2_ssub3_ssub4:
// Check that all subregs are generated on some examples
// CHECK-LABEL: Register D0:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138340.476767.patch
Type: text/x-patch
Size: 2226 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221120/885da04a/attachment.bin>
More information about the llvm-commits
mailing list