<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Sorry for taking so long to get back to you.  This has been put on
    the back burner for the moment.<br>
    <br>
    To answer your question, I don't believe this line of work will help
    you.  KnownBits would need to infer that some specific bit is
    non-zero to prove that the value in question is non-zero.  Unless
    I'm misreading your example, you don't know this.  You really want
    something more along the lines of a constant range analysis pass. 
    We have something like that in LVI today, but I've given absolutely
    no thought to how to use that in alias analysis.  Daniel's concerns
    seem entirely reasonable to me and I suspect would be prohibitive of
    any attempt before the pass manager has been *finally* finished. 
    (Feel free to go bug/harass Chandler!)<br>
    <br>
    To give a quick update on this line of work as a whole:<br>
    - Nick was able to run some internal tests for me.  His overall
    results showed that a) compile time wasn't too badly impacted (2-3%
    on average), but b) lots of bugs were exposed by enabling this.  I
    haven't had a chance to go stomp all those bugs and would definitely
    welcome help here.<br>
    - I need to get around to implementing a couple of known performance
    tweaks and completing the branch checking.  Currently the code is
    somewhat incomplete (but functional.)<br>
    - I plan to pursue turning this on by default once the previous two
    issues are addressed.<br>
    - I've also been looking in to other approaches for solving the same
    issues.  I see no reason to only solve this one way and have been
    trying to get some of the easy cases dealt with.  Examples include:
    <span class="transaction-comment" data-sigil="transaction-comment"
      data-meta="0_5"><a href="http://reviews.llvm.org/D9312"
        class="remarkup-link" target="_blank" rel="noreferrer">http://reviews.llvm.org/D9312</a>,
    </span><span class="transaction-comment"
      data-sigil="transaction-comment" data-meta="0_5"><a
        href="http://reviews.llvm.org/D9763" class="remarkup-link"
        target="_blank" rel="noreferrer">http://reviews.llvm.org/D9763</a>,
      <a class="moz-txt-link-freetext" href="https://llvm.org/bugs/show_bug.cgi?id=23333">https://llvm.org/bugs/show_bug.cgi?id=23333</a></span>.  <br>
    <br>
    Philip<br>
    <br>
    <div class="moz-cite-prefix">On 03/30/2015 08:48 AM, James Molloy
      wrote:<br>
    </div>
    <blockquote
cite="mid:CALCTSA02k67BRHwW7LGvZfu+Shv_RqkS-evj5yBtbnZqfakUjA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Philip,
        <div><br>
        </div>
        <div>Slightly late to the party here, but I think this work
          might help fix PR23067.</div>
        <div><br>
        </div>
        <div>In PR23067, BasicAA needs to know if a value is known
          non-zero or not. In the example code, the value is known
          non-zero by virtue of the dominating condition. However,
          IsKnownNonZero just calls calculateKnownBits. Your dominance
          stuff will be able to know that all bits cannot be zero, but
          that information is lost because any bit could be set or
          unset.</div>
        <div><br>
        </div>
        <div>Is there a plan, or what would be the easiest way, of
          extending your change so that isKnownNonZero would get the
          right information from a dominating condition?</div>
        <div><br>
        </div>
        <div>Cheers,</div>
        <div><br>
        </div>
        <div>James<br>
          <br>
          <div class="gmail_quote">On Tue, 10 Mar 2015 at 23:17 Philip
            Reames <<a moz-do-not-send="true"
              href="mailto:listmail@philipreames.com" target="_blank">listmail@philipreames.com</a>>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">REPOSITORY<br>
                rL LLVM<br>
              <br>
              <a moz-do-not-send="true"
                href="http://reviews.llvm.org/D7708" target="_blank">http://reviews.llvm.org/D7708</a><br>
              <br>
              Files:<br>
                llvm/trunk/lib/Analysis/ValueTracking.cpp<br>
                llvm/trunk/test/Transforms/InstCombine/dom-conditions.ll<br>
              <br>
              EMAIL PREFERENCES<br>
                <a moz-do-not-send="true"
                href="http://reviews.llvm.org/settings/panel/emailpreferences/"
                target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
              _______________________________________________<br>
              llvm-commits mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
              <a moz-do-not-send="true"
                href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits"
                target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
            </blockquote>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>