Sometimes it would be nice to stop InstCombine mid way through its combining to see the current IR. By using a debug counter we can place an upper limit on how many instructions to process.
The debug counter infrastructure also supports skipping some number of calls at the beginning as well, but that feels like it would generate very odd behavior with InstCombine.
I also wonder if we should change the DEBUG_COUNTER macro to have the semicolon outside like we do for STATISTIC. Since they are often going to appear at the top of a file near STATISTIC the inconsistency seems likely to cause people to add a semicolon after DEBUG_COUNTER anyway.