[llvm] [TableGen] Rework `EmitIntrinsicToBuiltinMap` (PR #104681)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 07:17:00 PDT 2024


jurahul wrote:

> > Do you have benchmarks that this is faster?
> 
> Not at the moment. This PR was motivated by an earlier debug of this code for a different PR where I observed that it could be improved (both the generated code as well as the code generating the code). Let me see if I put together a benchmark to see if the improvements actually improve performance. I did see that the static table of builtin names reduced by ~40% in size (from 229606 bytes to 134608 bytes) due to stripping out the common prefix.
> 
> I also realized that the current PR can be improved (it has some dead code that should be removed, maps can be combined, and lambdas can potentially be eliminated). I am going to work on splitting out the ADT changes into a separate PR (@kuhar I assume you meant the changes other than the one adding `maximal` which this used by this MR. Is that correct?) and on these improvements and benchmark. I will mark this PR as in progress.

For the benchmark that I have added to this MR, I see ~17-20% improvement in perf, though its flaky since this is a small function.

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


More information about the llvm-commits mailing list