[LLVMdev] Dependence Analysis

Tanya Lattner tonic at nondot.org
Wed Jul 20 20:55:45 PDT 2005


> LLVM already includes this: the -indvars pass.  It turns things like this:
>
> int *P = for (...; ... ; ++P)
>   *P
>
> to:
>
> int *P = ...
> for (int i = 0; ... ; ++i)
>  P[i]
>
> If you're interested in dependence analysis, the next important step is to 
> start analyzing distance and direction vectors.

You can check out 
lib/Target/SparcV9/ModuloScheduling/DependenceAnalyzer.cpp

It uses Alias Analysis and Scalar Evolution to figure out dependences and 
distances for single dimensional arrays. It needs more work, but its a 
start. Its not used by anyone currently. I wrote it for my 
ModuloScheduling work.

-Tanya




More information about the llvm-dev mailing list