<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class="gmail_extra">And what invalidates this cache? As far as I can tell the vectorizer can both delete and create new instructions, which should put this cache at risk of getting incorrect collisions.</div></div></blockquote></div><div class=""><div dir="ltr" class=""><div class="gmail_extra"><br class=""></div><div class="gmail_extra">Both, deleted and inserted instructions should not change the aliasing relationship between existing instructions. Therefore it should be OK to keep the cache alive for a whole vectorizer run on a function.</div><div class="gmail_extra"><br class=""></div></div></div><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class="gmail_extra">Why should we do caching at this layer rather than in the AA layer itself?</div></div></blockquote></div><div class=""><div dir="ltr" class=""><div class="gmail_extra"><br class=""></div><div class="gmail_extra">This is a good point. My intention was: AFAIK the AA does not cause performance problems elsewhere so I put the caching in SLPVectorizer.</div><div class="gmail_extra">But I agree, it could make sense to put it into AA.</div></div></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On 13 Jan 2015, at 12:51, Chandler Carruth <<a href="mailto:chandlerc@google.com" class="">chandlerc@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Jan 13, 2015 at 3:37 AM, Erik Eckstein <span dir="ltr" class=""><<a href="mailto:eeckstein@apple.com" target="_blank" class="">eeckstein@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":357" class="a3s" style="overflow:hidden">Author: eeckstein<br class="">
Date: Tue Jan 13 05:37:51 2015<br class="">
New Revision: 225786<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=225786&view=rev" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=225786&view=rev</a><br class="">
Log:<br class="">
SLPVectorizer: Cache results from memory alias checking.<br class="">
<br class="">
This speeds up the dependency calculations for blocks with many load/store/call instructions.<br class="">
Beside the improved runtime, there is no functional change.<br class=""></div></blockquote></div><br class="">Why should we do caching at this layer rather than in the AA layer itself?</div><div class="gmail_extra"><br class=""></div><div class="gmail_extra">And what invalidates this cache? As far as I can tell the vectorizer can both delete and create new instructions, which should put this cache at risk of getting incorrect collisions.</div><div class="gmail_extra"><br class=""></div><div class="gmail_extra">I feel like this patch probably should have gone through pre-commit review. Neither this design nor why it is correct is obvious.</div></div>
</div></blockquote></div><br class=""></body></html>