Aliasing of pointers from different address spaces

Hi,

Can I configure address spaces aliasing for my specific target?
I found this discussion (https://groups.google.com/forum/#!topic/llvm-dev/0ZbzzN6t05o) , where James says “pointers in different address spaces cannot alias”,
but it is not what I see in the code.
I looked for a way to customize address spaces separation in Target, but I can’t find.
Any thoughts?
Thanks.

  • Elena

Hi, Elena,

You’re correct. We do assume that pointers in different address spaces can alias.

Targets can add their own AA pass into the AA query chain, and one of the things such analysis passes can do account for target-specific knowledge of address-space semantics. For example, see lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp

-Hal

Thank you. That’s, probably, what I was looking for.

In this case

&getAnalysis().getAAResults()

will return the target-configured AAResults, right?

I’m asking, because I want to use this analysis within a standard pass, LICM, for example.