[llvm] [TableGen] Split large printInstruction() for NVPTX to avoid compiler limits (PR #218530)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 23:54:29 PDT 2026
================
----------------
kazutakahirata wrote:
Emit one `InstructionGroup` sequence per line with its starting offset comment. This shrinks `OverflowProgram[]` from ~6,450 lines to ~270 lines for NVPTX and makes sequence boundaries easy to see:
```suggestion
<< " /* 0 */ 0,\n";
unsigned Offset = 1;
for (const InstructionGroup &G : Groups) {
O << " /* " << Offset << " */";
for (const AsmWriterOperand &Op : G.FirstInst.Operands)
O << " " << Commands.lookup(Op.getCode(PassSubtarget)) << ",";
O << "\n";
Offset += G.FirstInst.Operands.size();
}
```
https://github.com/llvm/llvm-project/pull/218530
More information about the llvm-commits
mailing list