<div dir="ltr">Hello, <div><br></div><div>I'm trying to improve my understanding of the meaning of AliasAnalysis::alias queries and their results.  There was a conversation on this topic about a year ago:  <a href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-August/076068.html">http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-August/076068.html</a></div><div><br></div><div>Gerolf Hoflehner wrote:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I think I see the fundamental issue you are looking at. It is mentioned implicitly in the discussions, but not called out. In your CFG example there is no backedge (head always dominates tail), only retreat edges. So your graph is irreducible. For such graphs “simultaneous live” means that  there be can be two dynamic execution paths where the variables (memory locations, objects etc)  are simultaneously live, but they may not be live at the same time on all execution paths.  Since LLVM uses SSA,  all variables (memory locations, objects, … ) are strictly defined, so there cannot be irreducible dependence graphs. I believe this assumption is built into the alias queries. So to catch cases like in your scenario I think you need to base your queries on classical dataflow analysis.</blockquote><div><br></div><div><div>I was wondering if anyone knows....</div><div><br></div><div>(1) Was it intentional that AliasAnalysis allows queries in which neither address dominates the other?  Since AA queries don't sound well-defined for such cases, I'm surprised they're allowed to go unreported.</div><div><br></div><div>(2) When such AA queries are made, do we have an ideal answer is to the query?  Empirically it seems to be "may-alias".</div><div><br></div></div><div>Thanks,</div><div>Christian</div><div><br></div></div>