<div dir="ltr">At some point, that seems really expensive to do.<div>BasicAA was meant to be a simple, stateless AA.</div><div>It already does a lot of walking, and it gets expensive in those cases because it doesn't cache it.  It just has random cutoffs to try to make it cheap, but it doesn't always.</div><div>(I have profiles to prove it :P)<br>IMHO, Rather than shove more stuff *in* it, we should be slowly moving walking stuff out into some pass that is stateful, caching, and know when we invalidate it.  Then we can do expensive stuff in that pass.</div><div><br></div><div>Otherwise, what happens is someone says "hey, if only we increase this number to 7 instead of 5, we get this little case i have over here" (which you can make arbitrary), or more generally, "hey, if we only also calculated for this stateful piece of info, we get this little case over here"</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 30, 2015 at 8:48 AM, James Molloy <span dir="ltr"><<a href="mailto:james@jamesmolloy.co.uk" target="_blank">james@jamesmolloy.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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"><div><div class="h5">On Tue, 10 Mar 2015 at 23:17 Philip Reames <<a href="mailto:listmail@philipreames.com" target="_blank">listmail@philipreames.com</a>> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">REPOSITORY<br>
  rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D7708" target="_blank">http://reviews.llvm.org/D7708</a><br>
<br>
Files:<br>
  llvm/trunk/lib/Analysis/<u></u>ValueT<u></u>racking.cpp<br>
  llvm/trunk/test/Transforms/<u></u>Ins<u></u>tCombine/dom-conditions.ll<br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/<u></u>settin<u></u>gs/panel/<u></u>emailpreferences/</a><br></div></div><span class="">
______________________________<u></u><u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">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/<u></u>mailm<u></u>an/listinfo/llvm-commits</a><br>
</span></blockquote></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>