[LLVMdev] Loop data-dependence analysis

Tobias Grosser tobias at grosser.es
Mon Jun 16 00:17:19 PDT 2014


On 16/06/2014 05:25, Simone Atzeni wrote:
> Hello,
>
> I am very new in LLVM and I am trying to understand how to use it in my project.
>
> I would like to write a Pass (?) that analyzes the loops in a program and says if the loop has a data dependence and what kind of data dependence.
> Do you guys have any suggestion how do to it?

Hi Simone,

there are two existing approaches:

lib/Analysis/DependenceAnalysis.cpp uses a set of classical tests (GCD 
test). This pass is not used by any actual transformation code to my 
understanding also because it is incorrect in certain corner cases 
(Preston Briggs) should now the details and might also be able to guide 
you on how to improve it.

polly.llvm.org as a high-level loop transformation infrastructure 
includes a rather general dependence analysis that allows precise 
dependence checks for any set of affine-linear access functions.
See: tools/polly/lib/Analysis/Dependences.cpp

Cheers,
Tobias



More information about the llvm-dev mailing list