[llvm] [TableGen] Emit Debug code for dynamic bits(eg: instruction operands) in DecoderEmitter (PR #194699)

Prerona Chaudhuri via llvm-commits llvm-commits at lists.llvm.org
Fri May 1 08:14:43 PDT 2026


pchaudhuri-nv wrote:

Hello @lenary and @jurahul 


Thank you for the helpful discussions :) 
I have pushed another commit, that can reduce the code bloat ...
I have not made this opt-in.



But the changes done are :
1. print only when failing
2. shorten the failure message and the function name.




Do you think the current changes are fine then to be checked in ?? Because they will not be enabled in release mode... Or do we still want to make it an opt-in feature ?




```
    Debug + Asserts (CMAKE_BUILD_TYPE=Debug, LLVM_ENABLE_ASSERTIONS=ON)

      +---------+------------+------------+------------+-------------------+
      | Target  | Artifact   |       main |     branch |             Delta |
      +---------+------------+------------+------------+-------------------+
      | AArch64 | .inc bytes |  4,025,238 |  4,318,247 |  +293,009 (+7.3%) |
      | AArch64 | .inc lines |     53,131 |     54,611 |            +1,480 |
      | AArch64 | .a bytes   |  1,592,944 |  1,903,576 | +310,632 (+19.5%) |
      | AArch64 | .o .text   |    379,244 |    508,442 | +129,198 (+34.1%) |
      | AMDGPU  | .inc bytes | 13,208,072 | 13,558,010 |  +349,938 (+2.6%) |
      | AMDGPU  | .inc lines |    176,202 |    176,690 |              +488 |
      | AMDGPU  | .a bytes   |  8,007,582 |  8,333,326 |  +325,744 (+4.1%) |
      | AMDGPU  | .o .text   |  1,608,517 |  1,723,160 |  +114,643 (+7.1%) |
      +---------+------------+------------+------------+-------------------+

    Release + Asserts (CMAKE_BUILD_TYPE=Release, LLVM_ENABLE_ASSERTIONS=ON)

      +---------+------------+------------+------------+--------------------+
      | Target  | Artifact   |       main |     branch |              Delta |
      +---------+------------+------------+------------+--------------------+
      | AArch64 | .inc bytes |  4,025,238 |  4,318,247 |   +293,009 (+7.3%) |
      | AArch64 | .a bytes   |    474,080 |  1,055,376 | +581,296 (+122.6%) |
      | AArch64 | .o .text   |    252,674 |    551,093 | +298,419 (+118.1%) |
      | AMDGPU  | .inc bytes | 13,208,072 | 13,558,010 |   +349,938 (+2.6%) |
      | AMDGPU  | .a bytes   |  1,881,442 |  2,547,682 |  +666,240 (+35.4%) |
      | AMDGPU  | .o .text   |  1,059,270 |  1,403,399 |  +344,129 (+32.5%) |
      +---------+------------+------------+------------+--------------------+

```

https://github.com/llvm/llvm-project/pull/194699


More information about the llvm-commits mailing list