<div dir="ltr">On Fri, Mar 8, 2013 at 6:58 PM, Nick Lewycky <span dir="ltr"><<a href="mailto:nicholas@mxc.ca" target="_blank">nicholas@mxc.ca</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">Jan Wen Voung wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: jvoung<br>
Date: Fri Mar  8 16:56:31 2013<br>
New Revision: 176733<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=176733&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=176733&view=rev</a><br>
Log:<br>
Disable statistics on Release builds and move tests that depend on -stats.<br>
<br>
Summary:<br>
Statistics are still available in Release+Asserts (any +Asserts builds),<br>
and stats can also be turned on with LLVM_ENABLE_STATS.<br>
<br>
Move some of the FastISel stats that were moved under DEBUG()<br>
back out of DEBUG(), since stats are disabled across the board now.<br>
<br>
Many tests depend on grepping "-stats" output.  Move those into<br>
a orig_dir/Stats/. so that they can be marked as unsupported<br>
when building without statistics.<br>
<br>
Differential Revision: <a href="http://llvm-reviews.chandlerc.com/D486" target="_blank">http://llvm-reviews.chandlerc.<u></u>com/D486</a><br>
</blockquote>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Modified: llvm/trunk/include/llvm/ADT/<u></u>Statistic.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Statistic.h?rev=176733&r1=176732&r2=176733&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/include/<u></u>llvm/ADT/Statistic.h?rev=<u></u>176733&r1=176732&r2=176733&<u></u>view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- llvm/trunk/include/llvm/ADT/<u></u>Statistic.h (original)<br>
+++ llvm/trunk/include/llvm/ADT/<u></u>Statistic.h Fri Mar  8 16:56:31 2013<br>
@@ -51,7 +51,9 @@ public:<br>
<br>
    // Allow use of this class as the value itself.<br>
    operator unsigned() const { return Value; }<br></div>
-  const Statistic&operator=(unsigned Val) {<br>
+<br>
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_STATS)<br>
+   const Statistic&operator=(unsigned Val) {<div class="im"><br>
      Value = Val;<br>
      return init();<br>
    }<br>
</div></blockquote>
<br>
How does LLVM_ENABLE_STATS get defined? It isn't mentioned in <a href="http://config.h.in" target="_blank">config.h.in</a> or config.h.cmake, and even if it were, Statistic.h doesn't include config.h.<span class="HOEnZb"><font color="#888888"><br>

<br>
Nick<br></font></span></blockquote><div><br></div><div style>Hi Nick,</div><div style><br></div><div style>You're right that it's not part of config.h.  Right now, it would have to be defined as part of the compile flags.  I was following LLVM_ENABLE_DUMP, which isn't in config.h either =/</div>
<div style><br></div><div style>- Jan</div></div><br></div></div>