[LLVMdev] Address space extension

Michele Scandale michele.scandale at gmail.com
Wed Aug 7 14:33:14 PDT 2013


> There was this patch from a long time ago that never went in to use the
> address spaces for alias analysis:
> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20111010/129728.html
>
> The decision seems to be that LLVM addrspaces aren't required to not
> alias. I was thinking of following the suggestion to make the datalayout
> contain which address spaces can / cannot alias. Alternatively, the tbaa
> metadata might be appropriate for this, but I haven't looked at how that
> works.

Uhm... the fact that that different address spaces may alias is a 
problem: target address spaces may alias for whatever reason... This is 
an additional aspect that must be analyzed.
Beyond this, my proposal is about adding in a separate way the high 
level information to handle that by itself especially for those targets 
that do not uses different address spaces in the clang description 
target-info like X86. As said in the clang mailing list I think is not 
correct to cheat with the translation map to use the IR address spaces 
represent OpenCL like address spaces.

With this additional information IMO would be easier to teach the alias 
analyzer: by construction the logical address spaces should be 
considered disjoint, so having the information about physical and 
logical address spaces separated would be fine for the aliasing problem.

What do you think about this?



More information about the llvm-dev mailing list