[llvm-dev] recursive alias analysis allowed ?

Jeroen Dobbelaere via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 9 09:30:35 PDT 2018


Hi Hal et al,

I am extending the ScopedNoAliasAA pass with some deeper analysis. The goal is to add restrict member pointer support.

For that I'll need to do an extra alias-analysis request from within the ScopedNoAliasAA pass:

for example:
  %v1 = load i32*, i32** %p1
  %result1= load i32, i32* %v1
  %v2 = load i32*, i32** %p2
  %result2= load i32, i32* %v2  

in order to proof that %v1 and %v2 are not aliasing, I need to proof that their storages %p1 and %p2 are not aliasing.

- (1) This means that we will get recursive (possibly multiple levels) alias analysis calls.
- (2) I'll also need access to the main AliasAnalysis inside the ScopedNoAliasAA.

Do you think (1) will be safe to do ?

For (2), is the right location to do this, everywhere the DominatorTree is set ? (setDT(), ScopedNoAliasAAResult constructor, ...)

Thanks,

Jeroen Dobbelaere



More information about the llvm-dev mailing list