[all-commits] [llvm/llvm-project] 05af9c: [TableGen] Suppress per-HwMode duplicate instructi...
Jason Eckhardt via All-commits
all-commits at lists.llvm.org
Wed Feb 21 19:36:21 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 05af9c83f3a0d154f73d619ac1361eae05531e5e
https://github.com/llvm/llvm-project/commit/05af9c83f3a0d154f73d619ac1361eae05531e5e
Author: Jason Eckhardt <jeckhardt at nvidia.com>
Date: 2024-02-22 (Thu, 22 Feb 2024)
Changed paths:
A llvm/test/TableGen/HwModeEncodeDecode2.td
M llvm/utils/TableGen/DecoderEmitter.cpp
M llvm/utils/TableGen/DisassemblerEmitter.cpp
Log Message:
-----------
[TableGen] Suppress per-HwMode duplicate instructions/tables. (#82567)
Currently, for per-HwMode encoding/decoding, those instructions that do
not have a HwMode override are duplicated into the decoder tables for
all HwModes. This includes inducing multiple tables for instructions
that are otherwise unrelated (e.g., different namespace with no
overrides at all).
This patch adds support to suppress instruction and table duplicates.
TableGen option "-gen-disassembler --suppress-per-hwmode-duplicates"
enables the suppression (off by default).
For one downstream backend with a complicated ISA and major
cross-generation encoding differences, this eliminates ~32000 duplicate
table entries at the time of this patch.
There are legitimate reasons to suppress or not suppress duplicates. If
there are relatively few non-overridden related instructions, it can be
convenient to pull them into the per-mode tables (only need to decode
the per-mode tables, slightly simpler decode function in disassembler).
On the other hand, in some backends, the opposite is true or the size is
too large to tolerate any duplication in the first place. We let the
user decide which makes sense.
This is currently off by default, though there is no reason it couldn't
be enabled by default. Any existing backends downstream using the
per-HwMode feature will function as before. Turning on the feature
requires minor modifications to their disassembler due to more/less
tables and naming.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list