<div dir="ltr">On Wed, Feb 27, 2013 at 2:50 PM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">
<div class="im">On Wed, Feb 27, 2013 at 2:30 PM, Nadav Rotem <span dir="ltr"><<a href="mailto:nrotem@apple.com" target="_blank">nrotem@apple.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Eric, <div><br></div>

<div><div><div><div><blockquote type="cite"><blockquote class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<br>This patch disables the counters on non-debug builds. This reduces the runtime of SelectionDAGISel::SelectCodeCommon by ~5%.<br></blockquote><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


<br></div></blockquote><div><br></div></div><div>Most of the statistics numbers are under #ifndef NDEBUG. </div></div></div></div></div></blockquote><div><br></div></div><div>Throughout all of llvm? If so, cool. Was just wondering if we should solve this elsewhere rather than in each pass.</div>
<div class="im">
<div></div></div></div></div></div></blockquote><div><br></div><div style>I may be building the wrong version, but I think I still see "<span style="color:rgb(0,0,0)">Number of insts selected by target-independent selector", and the stat for the target-specific selector.  Is that going to add up to the same number as "</span><span style="font-family:arial,sans-serif;font-size:13px">NumFastIselSuccess", which was just put under DEBUG() here?</span></div>
<div style><br></div><div style>Also, I've also seen some of the assembler stats like "<span style="color:rgb(0,0,0)">Number of machine instrs printed" count up to largish numbers.</span></div><div style><br>
</div><div style> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">
<div class="gmail_quote"><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">
<div><div><div>
<div><blockquote type="cite"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


Hey, good idea. Wonder if we should do this in general and make statistics gathering dependent upon NDEBUG?</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


 </div><blockquote class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


-      unsigned NumFastIselRemaining = std::distance(Begin, End);<br>+      unsigned NumFastIselRemaining = 0;<br>+      NumFastIselRemaining = std::distance(Begin, End);<br></blockquote><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


<br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


Eh?</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


 </div></blockquote><div><br></div></div><div>I wanted to silence a warning because this variable is unused in Release.  Do you prefer that I silence it in another way ?</div><div><br></div></div></div></div></div></blockquote>


<div><br></div></div><div> It's used just a few lines below:</div><div><br></div><div><div>      unsigned NumFastIselRemaining = 0;</div><div class="im"><div>      NumFastIselRemaining = std::distance(Begin, End);</div>
</div><div class="im"><div>
      // Do FastISel on as many instructions as possible.                                                               </div><div>      for (; BI != Begin; --BI) {</div><div>        const Instruction *Inst = llvm::prior(BI);</div>

<div><br></div></div><div>        // If we no longer require this instruction, skip it.                                                           </div><div>        if (isFoldedOrDeadInstruction(Inst, FuncInfo)) {</div><div>
          --NumFastIselRemaining;</div>
<div>          continue;</div><div>        }</div><div><br></div><div><br></div><div>none of which is conditional on NDEBUG afaict? I could be missing something though. </div><div><br></div><div>I do see RemainingNow, NumFastIselSuccess, and NumDAGIselRetries as unused.</div>

<div><br></div><div>The normal way is to cast to void if it's actually not being used for some reason.</div><span class=""><font color="#888888"><div><br></div><div>-eric</div></font></span></div></div></div></div>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div></div>