[PATCH] D26155: Enable Loop Sink pass for functions that has profile.

Michael Zolotukhin via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 9 17:36:36 PST 2016


mzolotukhin added inline comments.


================
Comment at: llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp:650
 
+  MPM.add(createLoopSinkPass());
+  // Get rid of LCSSA nodes.
----------------
mehdi_amini wrote:
> davidxl wrote:
> > mzolotukhin wrote:
> > > Can't we schedule this right after LICM?
> > > I think we're placing LoopSinking in a separate instance of loop pass manager - is that what we want?
> > LICM also serves as an IR canonicalization pass that enables other optimization, so loopSinking needs to be a very late IR pass to avoid undoing LICM result too early. Otherwise the logic of loopSinking can be baked into LICM as proposed originally.
> Can we have a comment here, the PassManagerBuilder is already hard to follow, it'd be great to bake in why passes are there, and why they are where they are. 
I meant the last invocation of LICM, which is also very late (before createAlignmentFromAssumptionsPass). I don't see any loop pass in between them now. But anyway, I just wanted to make sure this placement is conscious, so if this is the case, I'm ok with it. And as Mehdi said, comments would be helpful here.


Repository:
  rL LLVM

https://reviews.llvm.org/D26155





More information about the llvm-commits mailing list