[llvm-commits] [PATCH] Address Space Alias Analysis

John Criswell criswell at illinois.edu
Thu Oct 13 09:07:14 PDT 2011


On 10/13/11 6:05 AM, Justin Holewinski wrote:
> On Thu, Oct 13, 2011 at 3:24 AM, Duncan Sands <baldrick at free.fr 
> <mailto:baldrick at free.fr>> wrote:
>
>     Hi Justin,
>
>     > Any opinions from the core developers?  It would be possible to
>     add this pass to
>     > the default alias analysis passes for some target triples.
>
>     I guess either Chris can pronounce from on high whether it is OK
>     to say that
>     pointers in different address spaces cannot alias each other, or
>     you can contact
>     the main developers for each LLVM target and ask them what the
>     situation is for
>     their target.  If pointers in different address spaces don't alias
>     for any of
>     the currently supported LLVM targets then I think you can just add
>     the logic to
>     basic alias analysis.
>
>
> Following the LLVM language reference, it is not required that they be 
> alias-free.
>
> In the interests of getting this in before the branch, I could add it 
> to the basic alias analysis, but leave it dependent on a command-line 
> option that is off by default.  Does this sound reasonable?

The only problem with this approach is that it doesn't allow a tool that 
links in the pass to programatically enable or disable the feature.

I would recommend:

1) Enhancing TargetData to know whether the different address spaces on 
a particular target are disjoint.

2) Instead of using a command-line option to enable a feature, use an 
AnalysisGroup that BasicAA queries to see what to do.  The default pass 
in the AnalysisGroup tells BasicAA to turn the feature off.  A different 
pass in the Analysis Group tells BasicAA to turn the feature on.  That 
way, a user or a tool just schedules an additional pass to enable the 
feature.

My two cents.

-- John T.

>
>     Ciao, Duncan.
>     _______________________________________________
>     llvm-commits mailing list
>     llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
>     http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
>
>
> -- 
>
> Thanks,
>
> Justin Holewinski
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111013/6128cf75/attachment.html>


More information about the llvm-commits mailing list