[all-commits] [llvm/llvm-project] ed5f8f: [LLVM][DecoderEmitter] Add option to use function ...

Rahul Joshi via All-commits all-commits at lists.llvm.org
Tue Jun 24 18:49:26 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ed5f8f238d68811ad5eabcdb0248bcd65ab81960
      https://github.com/llvm/llvm-project/commit/ed5f8f238d68811ad5eabcdb0248bcd65ab81960
  Author: Rahul Joshi <rjoshi at nvidia.com>
  Date:   2025-06-24 (Tue, 24 Jun 2025)

  Changed paths:
    A llvm/test/TableGen/DecoderEmitterFnTable.td
    M llvm/utils/TableGen/DecoderEmitter.cpp

  Log Message:
  -----------
  [LLVM][DecoderEmitter] Add option to use function table in decodeToMCInst (#144814)

Add option `use-fn-table-in-decode-to-mcinst` to use a table of function
pointers instead of a switch case in the generated `decodeToMCInst`
function.

When the number of switch cases in this function is large, the generated
code takes a long time to compile in release builds. Using a table of
function pointers instead improves the compile time significantly (~3x
speedup in compiling the code in a downstream target). This option will
allow targets to opt into this mode if they desire for better build
times.

Tested with `check-llvm-mc` with the option enabled by default.



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