<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>On Feb 6, 2013, at 12:23 PM, Renato Golin <<a href="mailto:renato.golin@linaro.org">renato.golin@linaro.org</a>> wrote:</div><div><div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">On 6 February 2013 18:16, Arnold Schwaighofer <span dir="ltr"><<a href="mailto:aschwaighofer@apple.com" target="_blank">aschwaighofer@apple.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">If you want to use Alias analysis see MemoryDependenceAnalysis::getDependency(Instruction *QueryInst) for an example how-to query AA if two accesses might alias. In principle,  you query AA->getLocation(Inst) to obtain the location (ignoring special cases). You then use this info to query AA->alias(Loc1, Loc2).<br>
</div></blockquote><div><br></div><div style="">Thanks! So it seems I was in the right direction...</div><div style=""><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">I am not sure the cases we would catch justify the added cost. This would have to be evaluated.</div></blockquote><div><br></div><div style="">I'm trying to avoid it at all costs, this is why my initial attempt was to store the data and *ONLY* if they're the same, I then go on to run the AA.</div>
<div style=""><br></div><div style="">Maybe an alternative is to store the Instruction and the Value (not just the Value) on the WriteObjects, and only when the Values match, I do AA on the Instructions. Then, I don't need the OffsetList at all. I think that has a good value, can you see anything wrong with it?</div></div></div></div></blockquote><div><br></div><div>In principle, assuming that you return a conservative answer when you don't know whether something might alias (different or unknown Values), yes .</div>The devil is in the detail :). You ignore no alias information on pointers this way (which is safe, but conservative). Also, you need to look at the attributes of memory access instructions (volatile, atomic and whatnot, see getDependency for this).<div><br></div><div>And as Hal said, thanks for looking into this!</div><div><br></div><div>- Arnold</div></div><br></div></body></html>