diff options
author | Rahul Joshi <rjoshi@nvidia.com> | 2025-06-05 06:17:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-05 06:17:50 -0700 |
commit | e53ccb78e46c6d923fee914b31d13d930021a954 (patch) | |
tree | e1d6f872bf3162ec860d52f7be9b03fca41869e4 /clang/lib/CodeGen | |
parent | 43bc5ea7fd9603e24e6830788cf1a8c6ab464b46 (diff) | |
download | llvm-e53ccb78e46c6d923fee914b31d13d930021a954.zip llvm-e53ccb78e46c6d923fee914b31d13d930021a954.tar.gz llvm-e53ccb78e46c6d923fee914b31d13d930021a954.tar.bz2 |
[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
```
Diffstat (limited to 'clang/lib/CodeGen')
0 files changed, 0 insertions, 0 deletions