[llvm-dev] DebugCounter and traps

David Greene via llvm-dev llvm-dev at lists.llvm.org
Mon Sep 24 12:06:57 PDT 2018

David Greene via llvm-dev <llvm-dev at lists.llvm.org> writes:

> I needed to see what queryAliasing was doing on the "bad"
> transformation.  Unfortunately, DebugCounter has no way to test the
> state of the counter without incrementing it, so I couldn't set a
> conditional breakpoint on the call to queryAliasing.  And conditional
> breakpoints are really slow anyway.

Let me correct that.  It's certainly possible to check the value in a
debugger without incrementing the counter.  But conditional breakpoints
are slow.

It's not possible to *programmatically* check the state of the counter
without changing it, which means one has to do some gymnastics to
remember the counter's value, as the "alternative" example demonstrates.


More information about the llvm-dev mailing list