<div dir="ltr">On Thu, Feb 28, 2013 at 9:19 AM, Eli Bendersky <span dir="ltr"><<a href="mailto:eliben@google.com" target="_blank">eliben@google.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">>> I kept NumDAGBlocks and NumFastIselBlocks, because they are called once<br>
>> per blocks and not once per instructions. I don't mind if we put them behind<br>
>> #ifndef NDEBUG as well.<br>
><br>
><br>
> It's why I was asking, I think it might be an interesting idea to put all<br>
> the statistics<br>
> behind NDEBUG so we can feel free to collect stats whenever rather than<br>
> needing to worry about putting the high firing status under NDEBUG<br>
> explicitly.<br>
<br>
</div>FWIW, I'm +1 on this. You'll still have to wrap the actual ++counter<br>
code with DEBUG or some other macro-fu all over the code, though.<br>
<br>
Eil<br>
</blockquote></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra" style>Perhaps we could just re-define the operator++(), operator--(), etc. in Statistics.h to only do real work "#if !defined(NDEBUG) || defined(LLVM_ENABLE_STATS)", and to be nops otherwise.  Where LLVM_ENABLE_STATS would be like LLVM_ENABLE_DUMP...   If that sounds reasonable, I could spin up a patch.</div>
<div class="gmail_extra" style><br></div></div>