diff options
| author | Craig Topper <craig.topper@sifive.com> | 2026-02-03 13:13:13 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-03 13:13:13 -0800 |
| commit | caab98284166784459a2fb76df7bca3f1d35e41e (patch) | |
| tree | edc40217bdc8affd6e1830104461184e31645e62 /llvm/lib/CodeGen/BasicBlockMatchingAndInference.cpp | |
| parent | 22c8344d986df3d91121b3c27d20eb820d828386 (diff) | |
| download | llvm-caab98284166784459a2fb76df7bca3f1d35e41e.zip llvm-caab98284166784459a2fb76df7bca3f1d35e41e.tar.gz llvm-caab98284166784459a2fb76df7bca3f1d35e41e.tar.bz2 | |
[SelectionDAGISel] Separate the operand numbers in OPC_EmitNode/MorphNodeTo into their own table. (#178722)
The operand lists for these opcode require 1 byte per operand and are
usually small values that fit in 3-4 bits. This makes their storage
inefficient. In addition, many EmitNode/MorphNodeTo in the isel table
will use the same list of operand numbers.
This patch proposes to separate the operand lists into their own table
where they can be de-duplicated. The OPC_EmitNode/MorphNodeTo in the
main table will only store an index into this smaller table.
This is a reduced version of a suggestion from this very old FIXME.
https://github.com/llvm/llvm-project/blob/d8d4096c0be0a6a3248c8deae96608913a85debf/llvm/utils/TableGen/DAGISelMatcherGen.cpp#L1070
For RISC-V this reduces the main table from 1437353 bytes to 1276015
bytes plus a 929 byte operand list table. A savings of about 11%.
For X86 this reduces the main table from 719237 bytes to 623612 bytes
plus a 1042 byte operand list table. A savings of about 11%.
I expect further savings could be had by moving more bytes over.
Diffstat (limited to 'llvm/lib/CodeGen/BasicBlockMatchingAndInference.cpp')
0 files changed, 0 insertions, 0 deletions
