[PATCH] D17203: [LICM] Sink entire inner loops.
Chris Diamand via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 1 11:32:16 PST 2016
chrisdiamand_arm added inline comments.
================
Comment at: lib/Transforms/Scalar/LICM.cpp:120
@@ -119,3 +120,2 @@
void getAnalysisUsage(AnalysisUsage &AU) const override {
- AU.setPreservesCFG();
AU.addRequired<DominatorTreeWrapperPass>();
----------------
reames wrote:
> You'll need to enumerate which passes are preserved without this.
I think Chandler's recent patches to LICM et al now mean I now don't need to add anything here.
================
Comment at: lib/Transforms/Scalar/LICM.cpp:613
@@ +612,3 @@
+ // Make sure this is the dominating block.
+ if (SubLoop->getHeader() == BB) {
+ if (canSinkSubLoop(SubLoop, AA, LI, DT, TLI, CurLoop, CurAST,
----------------
reames wrote:
> Introducing a helper function isHeaderOfSubLoop would make this far easier to follow.
I'm not sure what you're after here, is it really that unclear? I've kept this check out of `canSinkSubLoop()` so that I can do everything after this line in terms of `Loop *SubLoop` instead of referring to the subloop by its header.
http://reviews.llvm.org/D17203
More information about the llvm-commits
mailing list