<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 28, 2013 at 9:01 AM, Eli Bendersky <span dir="ltr"><<a href="mailto:eliben@google.com" target="_blank">eliben@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thu, Feb 28, 2013 at 8:55 AM, Jan Voung <<a href="mailto:jvoung@chromium.org">jvoung@chromium.org</a>> wrote:<br>

> On Wed, Feb 27, 2013 at 2:50 PM, Eric Christopher <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>><br>
> wrote:<br>
>><br>
>><br>
>><br>
>><br>
>> On Wed, Feb 27, 2013 at 2:30 PM, Nadav Rotem <<a href="mailto:nrotem@apple.com">nrotem@apple.com</a>> wrote:<br>
>>><br>
>>> Hi Eric,<br>
>>><br>
>>>><br>
>>>> This patch disables the counters on non-debug builds. This reduces the<br>
>>>> runtime of SelectionDAGISel::SelectCodeCommon by ~5%.<br>
>>><br>
>>><br>
>>><br>
>>> Most of the statistics numbers are under #ifndef NDEBUG.<br>
>><br>
>><br>
>> Throughout all of llvm? If so, cool. Was just wondering if we should solve<br>
>> this elsewhere rather than in each pass.<br>
><br>
><br>
> I may be building the wrong version, but I think I still see "Number of<br>
> insts selected by target-independent selector", and the stat for the<br>
> target-specific selector.  Is that going to add up to the same number as<br>
> "NumFastIselSuccess", which was just put under DEBUG() here?<br>
><br>
> Also, I've also seen some of the assembler stats like "Number of machine<br>
> instrs printed" count up to largish numbers.<br>
><br>
<br>
</div>These come from FastISel.cpp:<br>
<br>
<br>
STATISTIC(NumFastIselSuccessIndependent, "Number of insts selected by "<br>
          "target-independent selector");<br>
STATISTIC(NumFastIselSuccessTarget, "Number of insts selected by "<br>
          "target-specific selector");<br>
STATISTIC(NumFastIselDead, "Number of dead insts removed on failure");<br>
<br>
Unlike the counter Nadav put under DEBUG, these one get reported in<br>
non-debug runs as well. Would it make sense to move them under DEBUG<br>
as well?<br></blockquote><div><br></div><div style>This is what I was talking about that Nadav never bothered to respond to.</div><div style>Whether or not it made sense to put all of the statistics as only firing during</div>
<div style>debug builds and then making the change in the statistics framework rather</div><div style>than #if NDEBUG for each set of statistics and the assorted increments.</div><div style><br></div><div style>-eric</div>
</div></div></div>