[LLVMdev] Choosing an alias analyzer

Pranav Bhandarkar pranavb at codeaurora.org
Fri Oct 19 11:44:50 PDT 2012


In lib/Transforms/IPO/PassManagerBuilder.cpp: addInitialAliasAnalysisPasses,
I see this code
  // Add TypeBasedAliasAnalysis before BasicAliasAnalysis so that
  // BasicAliasAnalysis wins if they disagree. This is intended to help
  // support "obvious" type-punning idioms.

My goal is to use ScalarEvolutionAliasAnalysis in MemoryDependenceAnalysis.
When I do,  getPassName in MemoryDependenceAnalysis (by stepping into
getAnalysisUsage), I get
$39 = 0x399f778 "Basic Alias Analysis (stateless AA impl)" 

To switch to ScalarEvolutionAnalysis, I changed
lib/Transforms/IPO/PassManagerBuilder.cpp: addInitialAliasAnalysisPasses to
call createScalarEvolutionAliasAnalysisPass instead of
But, when I do getPassName() in MemoryDependenceAnalysis , I get TBAA and
not Scalar Evolution Alias Analysis.

What do I have to do to be able to use SCEV Alias Analysis by using the
clang driver (which seems to populate its passes via PassManagerBuilder.cpp)

Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
The Linux Foundation

More information about the llvm-dev mailing list