[llvm] [llvm-exegesis] Debug generated disassembly (PR #142540)

Sjoerd Meijer via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 9 02:58:22 PDT 2025


sjoerdmeijer wrote:

> I don't exactly see the point of this. Running objdump (or llvm-objdump/whatever version) on the output of -dump-object-to-disk is intended to cover this exact use case. I don't think the slight convenience of running it automatically by passing -debug-only or -debug outweights the extra code complexity and other problems that will come with this.

This would be a very welcome debug feature for me. I agree that this can be achieved in the way you described it, but it would be so much more efficient for me if I can flip a switch and don't need to do this all manually. Analysing the snippets is really important, i.e. analysing them to see if they truly test what they want to test is important and time consuming, and anything that helps is welcome.

I agree with the trade-off in general, a debug feature shouldn't lead to massive churn in the code, or pose maintainance problems now or later, but this really doesn't seem to be the case here. I.e., it is self-contained, and not a lot of code, partly because it already relies on the infrastructure that is mostly there already. 

Long story short, I fully support the change, but I would like to see 2 changes:
- I agree we don't want hard-code paths, so we want to remove `/usr/bin/objdump`, and we want to change that to `llvm-objdump`. That is already used in some test cases, so that is not a new dependency,
- and we need a test-case, because we need one, and also so that we can see how this looks like. 

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


More information about the llvm-commits mailing list