[all-commits] [llvm/llvm-project] e53ccb: [LLVM][MC] Introduce `OrFail` variants of MCD ops ...
Rahul Joshi via All-commits
all-commits at lists.llvm.org
Thu Jun 5 06:18:12 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e53ccb78e46c6d923fee914b31d13d930021a954
https://github.com/llvm/llvm-project/commit/e53ccb78e46c6d923fee914b31d13d930021a954
Author: Rahul Joshi <rjoshi at nvidia.com>
Date: 2025-06-05 (Thu, 05 Jun 2025)
Changed paths:
M llvm/include/llvm/MC/MCDecoderOps.h
M llvm/lib/Target/AArch64/CMakeLists.txt
M llvm/test/TableGen/VarLenDecoder.td
M llvm/test/TableGen/trydecode-emission.td
M llvm/test/TableGen/trydecode-emission2.td
M llvm/test/TableGen/trydecode-emission3.td
M llvm/test/TableGen/trydecode-emission4.td
M llvm/utils/TableGen/DecoderEmitter.cpp
M utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
Log Message:
-----------
[LLVM][MC] Introduce `OrFail` variants of MCD ops (#138614)
Introduce `OrFail` variants for all MCD Decoder Ops that have
`NumToSKip` encoded with them. This is intended to capture the common
case of jumps to the end of the decoder table which has a `OP_Fail` at
the end. Using the `OrFail` variants of these ops avoid encoding the
`NumToSkip` jump offset for these cases, resulting in a reduction in the
size of the decoder tables (from 5 - 17%). Additionally, for the AArch64
target, the table size reduces enough to switch to using 2-byte
`NumToSkip` encoding instead of existing 3-bytes, resulting in a net 30%
reduction in the size of the decoder table.
The total reduction in the size of the decoder tables for different
targets is as follows (computed using the following command: `for i in
*.inc; do echo -n ``basename $i: ``; grep "MCD::OPC_Fail," $i | awk
'{sum += $2} END { print sum}'; done`)
```
Target Old Size New Size % Reduction
================================================
AArch64 153268 106987 30.20
AMDGPU 412056 340856 17.28
ARC 5061 4605 9.01
ARM 73831 60847 17.59
AVR 1306 1158 11.33
BPF 1927 1795 6.85
CSKY 8692 6922 20.36
Hexagon 41965 34759 17.17
Lanai 982 924 5.91
LoongArch 21629 20035 7.37
M68k 13461 11689 13.16
MSP430 3716 3384 8.93
Mips 31415 25771 17.97
PPC 28931 24771 14.38
RISCV 34800 28352 18.53
Sparc 7432 6236 16.09
SystemZ 32248 29716 7.85
VE 42873 36923 13.88
XCore 2316 2196 5.18
Xtensa 3443 2793 18.88
```
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