<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On Aug 10, 2007, at 10:15 AM, David Greene wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">However, what happens when alias analysis information gets invalidated?</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Is Andersen's still "available" in the sense analysis groups use it? <SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">If not, it seems it would be tough to make sure Andersen's is always</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">used everywhere that AliasAnalysis is asked for because there are passes</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">llvm runs without any command-line directive and those passes could</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">invalidate AA.</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Or is it sufficient than an Andersen's object is constructed and that that</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">constitutes "availability?"<SPAN class="Apple-converted-space">  </SPAN></FONT></P></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>What do you mean by "available" ? You are using quotes :)</DIV><BR><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">What happens if multiple alias analyses are</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">constructed?<SPAN class="Apple-converted-space">  </SPAN>Is the most-recently constructed one considered the "available"<SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">one?</FONT></P> </BLOCKQUOTE><BR></DIV><DIV>When alias info is invalidated, pass manager is responsible to reconstruct alias analysis before a pass that requires alias info is executed. If multiple alias analysis are constructed then non default alias analysis will get used and recreated as per need.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Note, the goal of analysis group is to select desired analysis implementations during entire run of optimizer. I do think it is designed to handle cases where during one instance of optimizer multiple instances of analysis implementations are used simultaneously. However, this may work for limited case of one default and one non-default analysis implementation but I think it will break down when multiple non-default analysis implementations are constructed.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>If a pass requires particular implementation explicitly, i.e addRequired<Andersens>() then pass manager will make it available irrespective of alias analysis group. However explicitly requiring an analysis pass defeats the purpose of analysis group.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>-</DIV><DIV>Devang</DIV></BODY></HTML>