<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>That sounds like a much better approach to me.<br><br><div>-Chris</div></div><div><br>On Feb 28, 2013, at 12:42 PM, Jan Voung <<a href="mailto:jvoung@chromium.org">jvoung@chromium.org</a>> wrote:<br><br></div><blockquote type="cite"><div><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>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>llvm-commits mailing list</span><br><span><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a></span><br><span><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></span><br></div></blockquote></body></html>