[llvm] [LLVM][DecoderEmitter] Add option to use function table in decodeToMCInst (PR #144814)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 23 09:37:23 PDT 2025
mshockwave wrote:
> ( 81.8%) Two-Address instruction pass
This one, IIRC, scales linearly by the number of instructions. So it seems like the compilation speed slow down was primarily caused by the fact that the function is just too big.
> ( 47.4%) SimplifyCFGPass
This is kind of expected
> I setup some profiling code in llvm-mc that will try to disassemble each byte pattern some large number of times and profile the loop using the `TimeTraceScope` API and ran it with 3 AMDGPU llvm-mc unit tests (since it has the largest number of cases ~1500 in the upstream code), and I see the following (first run with function pointers, second run with switch). It seems the switch-case version is actually slower than the function pointer version. It could be measurement noise, but the signal seems consistent.
Thanks for the experiments!
https://github.com/llvm/llvm-project/pull/144814
More information about the llvm-commits
mailing list