[llvm] [TableGen] Add support for sparse direct-lookup tables (PR #201158)
Igor Wodiany via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 8 02:59:46 PDT 2026
IgWod wrote:
> Does this have any effect on the behaviour when you try to look up a key that is not in the table?
If the key is in range, you get a default initialized record, in the VOPD example: `(VOPDXYKey = 0, IsX = false, IsY = false)`. For an out-of-range key there is an assert in the lookup function. This is the most efficient implementation, but we probably could include extra checks to return nullptr in those cases; at the expense of more code.
https://github.com/llvm/llvm-project/pull/201158
More information about the llvm-commits
mailing list