<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    You are mostly likely using a Release build.  -stats only does
    anything with Assertions enabled.  <br>
    <br>
    <div class="moz-cite-prefix">On 02/18/2015 08:58 AM, Rob Stewart
      wrote:<br>
    </div>
    <blockquote
cite="mid:CA+ZOasL9QLedNCxFe52=Q0qgtD4-R+kXkXQtGTSkBsEV7HUpuw@mail.gmail.com"
      type="cite">
      <div dir="ltr"><span
          style="font-size:13.1999998092651px;line-height:19.7999992370605px">Given
          the program:</span>
        <div
          style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br>
        </div>
        <div
          style="font-size:13.1999998092651px;line-height:19.7999992370605px">
          <div>int sum(int i,int j)</div>
          <div>{ return i+j; }</div>
          <div><br>
          </div>
          <div>int main()</div>
          <div>{ sum(3,2); }</div>
        </div>
        <div
          style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br>
        </div>
        <div
          style="font-size:13.1999998092651px;line-height:19.7999992370605px">$
          clang -S -emit-llvm foo.c<br>
        </div>
        <div
          style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br>
        </div>
        <div
          style="font-size:13.1999998092651px;line-height:19.7999992370605px">Now
          I'd like to print all statistics. Unfortunately, the following
          prints nothing:</div>
        <div
          style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br>
        </div>
        <div
          style="font-size:13.1999998092651px;line-height:19.7999992370605px">$
          opt -S -O3 -stats < foo.ll > /dev/null<br>
        </div>
        <div
          style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br>
        </div>
        <div
          style="font-size:13.1999998092651px;line-height:19.7999992370605px">However,
          running the following prints an IR that is different to the
          contents of foo.ll:</div>
        <div
          style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br>
        </div>
        <div
          style="font-size:13.1999998092651px;line-height:19.7999992370605px">$
          opt -S -O3 foo.ll<br>
        </div>
        <div
          style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br>
        </div>
        <div
          style="font-size:13.1999998092651px;line-height:19.7999992370605px">I'm
          using LLVM 3.5. <span style="font-size:13.1999998092651px">I'm
            doing something very obviously wrong. What is it?</span></div>
        <div
          style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br>
        </div>
        <div
          style="font-size:13.1999998092651px;line-height:19.7999992370605px">--</div>
        <div
          style="font-size:13.1999998092651px;line-height:19.7999992370605px">Rob</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>