[LLVMdev] Correct way to chain alias analysis passes?

Robison, Arch arch.robison at intel.com
Fri Apr 18 11:26:56 PDT 2014


What is the right way to set up chained alias analysis passes?  I'd like to use both TypeBasedAliasAnalysis and ScalarEvolutionAliasAnalysis.  In the Julia code that builds the LLVM pass list, I tried the following:

    FPM = new FunctionPassManager(m);
    ...
    jl_TargetMachine->addAnalysisPasses(*FPM);
    FPM->add(createTypeBasedAliasAnalysisPass());
    FPM->add(createScalarEvolutionAliasAnalysisPass());
    ...

But it appears to be running only TypeBasedAliasAnalysis, and when I step through the code, it appears that TypeBasedAliasAnalysis is chained to NoAliasAnalysis.

- Arch D. Robison





More information about the llvm-dev mailing list