<div dir="ltr"><div style>Hi Arnold,</div><div style><br></div><div style>Thanks for the review!</div><div style><br></div><div><br></div>On 12 February 2013 17:43, 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">The existing Analysis tests for "overlap" between memory regions (underlying pointers). As such, it can ignore the access pattern and can operate using just the pointer and the underlying object.<br>
</blockquote><div><br></div><div style>Hum, ok, that should simplify a lot the code, then. Though, I could only find the getLocation() with StoreInst, LoadInst, VAArgInst, not generic values.</div><div><br></div><div><br>
</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">We will have to ask "Do the future vectorized accesses overlap?" Something like:<br>
<br>
AA->alias((&A[i+1], MaxVF*4), (&A[i], MaxVF*4)).<br></blockquote><div><br></div><div style>I know, there was a comment on the previous patch to that effect. I couldn't find an AA method to inspect memory considering strides. It might be possible to examine the edges, but it'd be more efficient to do that inside AA. I assume this is done elsewhere, maybe I could re-use the same idea.</div>
<div><br></div><div><br></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">Also, for the writes you use the underlying object to look up a value in the ReadWrites multi-map that is populated with "getPointerOperand()" which is not necessarily the underlying object.<br>
</blockquote><div><br></div><div style>That is how the vector was populated, I just stored the instruction alongside it to retrieve later on. From what you said above, it might not be necessary (but I'd have to have a way to check aliasing on the underlying objects).</div>
<div style><br></div><div style>I spent some time looking at that part of the code and I'm still in doubt as to what that possible regions can the underlying object point to, or if the underlying object is always accessible via the pointer operand.</div>
<div style><br></div><div style>The code seems marginally ok, since all the other vectorization cases are still working and the new global alias also works, but that doesn't say much...</div><div style><br></div><div style>
cheers,</div><div style>--renato</div></div></div></div>