[PATCH] D66369: [TableGen] Make MCInst decoding more table-driven

Luís Marques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 15:37:41 PST 2021


luismarques added a comment.

In D66369#2543322 <https://reviews.llvm.org/D66369#2543322>, @nlguillemot wrote:

> I haven't tried but it might be interesting. Do you have a suggestion for how I could benchmark that?

I'm probably not the best person to review this patch or answer that but I would say just disassemble a large number of files with llvm-objdump and see how your patch impacts the disassembly time. Some note:

- Compile some common programs with typical flags to obtain object files that are representative.
- Repeat the benchmark for all of the archs, as the results might differ. Which implies you need to build cross-platform programs.
- Try to isolate spurious factors like cold caches, e.g. by disassembling twice and keeping the second value.
- Send the output of llvm-objdump to /dev/null.

You could also just microbenchmark the decoding itself with custom code. That will better isolate the impact of your changes but it won't elucidate what the impact is on actual programs like llvm-objdump. I expect that your patch will reduce icache pressure and increase dcache pressure, which might have interesting interactions. But maybe none of that matters because the runtime impact of your patch is either not significant or clearly always positive.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66369/new/

https://reviews.llvm.org/D66369



More information about the llvm-commits mailing list