[LLVMdev] speculative parallelization in LLVM

Jimborean Alexandra xinfinity_a at yahoo.com
Mon Jul 18 10:03:55 PDT 2011


Hi,

I plan to do some speculative parallelization in LLVM using Polly and I target 
loops that contain pointers and indirect references. As far as I know, Polly 
generates optimized code starting from the SCoPs, therefore I plan to replace 
all pointer accesses with array accesses, such that Polly will accept the code. 
Each array access should use a liner function of the enclosing loops indices. 


This is how I plan to implement it:

1) parse the alloca instructions and find declarations of pointers
2) for each pointer 
        3) delete the alloca instruction
        4) create a new alloca instruction for the new array
        5) replace all uses of the pointer with the new array


Feed this code into Polly, get an optimized version and replace back the array 
accesses with the original corresponding pointers.

Please advise me whether this is a good strategy to replace the pointer 
accesses.

Thank you,
Alexandra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110718/7b621bbb/attachment.html>


More information about the llvm-dev mailing list