[PATCH] Vectorizing Global Structures - Take 2
Daniel Berlin
dberlin at dberlin.org
Thu Feb 14 11:55:24 PST 2013
On Thu, Feb 14, 2013 at 2:49 PM, Arnold Schwaighofer <
aschwaighofer at apple.com> wrote:
>
> On Feb 14, 2013, at 12:34 PM, Renato Golin <renato.golin at linaro.org>
> wrote:
>
> On 14 February 2013 17:46, Arnold Schwaighofer <aschwaighofer at apple.com>wrote:
>
>> The existing implementation already relies on runtime checks (it has to
>> make sure that an unknown object and a known object do not overlap). Yes,
>> AA will conservatively return MayAlias/PartialAlias if it does not know two
>> objects. You just have to make sure that you actually query it with that
>> unknown object.
>>
>
> I was expecting this, and I'm planning to be extra conservative to begin
> with. So, for now, MayAlias and PartialAlias are reasons to stop trying.
> Once we can get the code to understand basic independent objects inside a
> structure, we can specialize for the other cases.
>
>
> Okay. But understand that LLVM IR semantics does not give you much leeway
> in "understanding independent objects inside a structure". That is what you
> need TBAA for.
>
TBAA is not a good answer to this general problem. It falls down pretty
quickly when you start to ask it about fields inside structures.
Proper structure aliasing (IE aliasing on pieces of structs), including
pointer analysis, in languages where things can point to fields inside
structures (like GEP does) is not only possible to do on LLVM IR, it's
actually been done before :)
See, e.g, http://www.cs.ucsb.edu/~benh/research/downloads.html (The field
sensitive version, and the flow sensitive/field sensitive versions).
Both were done on earlier versions of LLVM, but could be made to work today.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130214/d296deae/attachment.html>
More information about the llvm-commits
mailing list