[PATCH] D17203: [LICM] Sink entire inner loops.

Chris Diamand via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 1 11:31:59 PST 2016


chrisdiamand_arm retitled this revision from "[LICM] Hoist and sink entire inner loops." to "[LICM] Sink entire inner loops.".
chrisdiamand_arm updated the summary for this revision.
chrisdiamand_arm updated this revision to Diff 49514.
chrisdiamand_arm marked an inline comment as done.
chrisdiamand_arm added a comment.

This update removes the hoisting code, in a bid to make the diff a bit more manageable.

It addresses two main issues pointed out by Philip:

- It now tells the LPPassManager about loops which have been moved.
- It recalculates the dominator tree after each pass.

There's also some other stuff, mostly factoring out various checks so they can be re-used for hoisting in a later patch.

In particular I'd welcome any comments on the dominator tree handling. My assumption here is that we don't need to update the DT in `sinkRegion()` (even though it's being traversed), because all the children of a subloop have already been visited by the time the sinking actually happens. One benefit of leaving out the hoisting for now is that the above assumption doesn't hold for hoisting...

Cheers!


http://reviews.llvm.org/D17203

Files:
  include/llvm/Analysis/LoopInfo.h
  include/llvm/Analysis/LoopPass.h
  include/llvm/Transforms/Utils/LoopUtils.h
  lib/Analysis/LoopInfo.cpp
  lib/Analysis/LoopPass.cpp
  lib/Transforms/Scalar/LICM.cpp
  test/Analysis/ScalarEvolution/2012-03-26-LoadConstant.ll
  test/Transforms/LICM/inner-loop-dont-sink.ll
  test/Transforms/LICM/inner-loop-sink-multiple-phi.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17203.49514.patch
Type: text/x-patch
Size: 22137 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160301/2a5ea530/attachment.bin>


More information about the llvm-commits mailing list