[llvm] [NFC][TableGen] DecoderEmitter optimize scope stack in `Filter::emitTableEntry` (PR #135693)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 14 18:02:57 PDT 2025


jurahul wrote:

Note, this can go by itself, but its really in preparation for another follow-on change to optimize the encoding of the decoder ops that end up jumping to the "Op_Fail" case, by adding "OrFail" variants of these ops (for ex, OPC_FilterValueOrFail) which do not need to encode the 24-bit NumToSkip that just jump to Op_Fail in the decoder table and will directly fail.

I am hoping that this will help reduce the size of the decoder table by doing 2 things: (a) avoid the 3 byte encoding of  NumToSkip for such ops, and (2) I suspect the NumToSkip was bumped from 2 bytes to 3 to accommodate these "long" jumps to the end of the table. If we can avoid encoding them, maybe we can go back to 16-bits for NumToSkip.

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


More information about the llvm-commits mailing list