[LLVMdev] [Polly] Move Polly's execution later

Star Tan tanmx_star at yeah.net
Thu Sep 19 07:46:52 PDT 2013


Hi Tobias,


I am trying to move Polly later.


LLVM provides some predefined ExtensionPointTy:
    EP_EarlyAsPossible,
    EP_ModuleOptimizerEarly,
    EP_LoopOptimizerEnd,
    EP_ScalarOptimizerLate,
    ...


Currently Polly uses "EP_EarlyAsPossible" to run as early as possible.  As what you suggested:
>Instead of removing canonicalization passes, I believe we may want to 
>move Polly to a later place in the pass manager. Possibly at the 
>beginning of the loop optimizer right before PM.add(createLoopRotatePass());
I want to move it to the point immediate after someone Loop optimization pass, e.g. MPM.add(createLoopRotatePass()).  However no predefined ExtensionPointTy is available for this purpose. Instead, the "EP_ModuleOptimizerEarly" would move Polly before all loop optimization passes.


In my option, there are two solutions: one is to use "EP_ModuleOptimizerEarly" (only modify the tool/polly/lib/RegisterPasses.cpp) to move Polly before all loop optimization passes; the other is to add a new ExtensionPointTy, e.g. "EP_LoopRotateEnd" and move Polly exactly immediate after the "LoopRotate" pass (need to modify tool/polly/lib/RegisterPasses.cpp, include/llvm/Transforms/IPO/PassManagerBuilder.h and lib/Transforms/IPO/PassManagerBuilder.cpp). We can use the second way to investigate other points to start Polly.


Is my understanding correct? Do you have any further suggestion?


Thanks,
Star Tan 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130919/a3e2ba34/attachment.html>


More information about the llvm-dev mailing list