<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">Hi Tobias,<div><br></div><div>I am trying to move Polly later.</div><div><br></div><div>LLVM provides some predefined ExtensionPointTy:</div><div><div> EP_EarlyAsPossible,</div><div> EP_ModuleOptimizerEarly,</div><div> EP_LoopOptimizerEnd,</div><div> EP_ScalarOptimizerLate,</div><div> ...</div></div><div><br></div><div>Currently Polly uses "EP_EarlyAsPossible" to run as early as possible. As what you suggested:</div><pre>>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 <span style="font-size: 14px; line-height: 1.7;">PM.add(createLoopRotatePass());</span></pre><pre><span style="font-size: 14px; line-height: 1.7;">I want to move it to the point immediate after someone Loop optimization pass, e.g. M</span><span style="font-size: 14px; line-height: 1.7;">PM.add(createLoopRotatePass()). However no predefined </span><span style="font-size: 14px; line-height: 1.7;">ExtensionPointTy is available for this purpose. Instead, the "</span><span style="white-space: normal;">EP_ModuleOptimizerEarly</span><span style="font-size: 14px; line-height: 1.7;">" would move Polly before all loop optimization passes.</span></pre><div><span style="font-size: 14px; line-height: 1.7;"><br></span></div><div><span style="font-size: 14px; line-height: 1.7;">In my option, there are two solutions: one is to use "</span>EP_ModuleOptimizerEarly<span style="font-size: 14px; line-height!
: 1.7;">" (only modify the tool/polly/lib/</span>RegisterPasses.cpp) <span style="font-size: 14px; line-height: 1.7;">to move Polly before all loop optimization passes; the other is to add a new ExtensionPointTy, e.g. "</span><span style="font-size: 14px; line-height: 1.7;">EP_LoopRotateEnd" and move Polly exactly immediate after the "LoopRotate" pass (need to modify </span><span style="font-size: 14px; line-height: 1.7;">tool/polly/lib/</span>RegisterPasses.cpp, include/llvm/Transforms/IPO/PassManagerBuilder.h and lib/Transforms/IPO/PassManagerBuilder.cpp)<span style="font-size: 14px; line-height: 1.7;">. We can use the second way to investigate other points to start Polly.</span></div><div><span style="font-size: 14px; line-height: 1.7;"><br></span></div><div><span style="font-size: 14px; line-height: 1.7;">Is my understanding correct? Do you have any further suggestion?</span></div><div><span style="font-size: 14px; line-height: 1.7;"><br></span></div><div!
><span style="font-size: 14px; line-height: 1.7;">Thanks,</span></div>
<div><span style="font-size: 14px; line-height: 1.7;">Star Tan </span></div></div>