[llvm] [DebugCounter] Add -print-debug-counter-queries option (PR #162827)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 10 05:27:22 PDT 2025


nikic wrote:

> > in order to find the correct counter value to use to hit a specific point in the transform.
> 
> Can't we use `utils/bisect-skip-count` + grep to find the point?

In theory yes, but this is a very complicated and slow way to do it.

To clarify the use case: When looking at an InstCombine log, I want to see how the IR looked like at a specific point in the log. This is easy to do if I can get the debug counter at that point. I could of course write a bash script that greps for some part of the log (which may be a bit tricky due to instruction revisits) and bisect using it, but it's quite roundabout.

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


More information about the llvm-commits mailing list