]> granicus.if.org Git - llvm/commit
[LoopUnrolling] Re-prioritize Peeling and Partial unrolling
authorSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 3 Mar 2017 18:19:10 +0000 (18:19 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 3 Mar 2017 18:19:10 +0000 (18:19 +0000)
commitc4c0c1a3edf0d612f19db43d4875f93ee6437005
tree499c93e55a65cb8865bfb062352f848def98788b
parentc949f85bf5f71faf26953bd3b119c655d26a80d7
[LoopUnrolling] Re-prioritize Peeling and Partial unrolling

Summary:
In current implementation the loop peeling happens after trip-count based partial unrolling and may
sometimes not happen at all due to it (for example, if trip count is known, but UP.Partial = false). This
is generally bad, the more than there are some situations where peeling is profitable even if the partial
unrolling is disabled.

This patch is a NFC which reorders peeling and partial unrolling application and prepares the code for
implementation of the said optimizations.

Patch by Max Kazantsev!

Reviewers: sanjoy, anna, reames, apilipenko, igor-laevsky, mkuper

Reviewed By: mkuper

Subscribers: mkuper, llvm-commits, mzolotukhin

Differential Revision: https://reviews.llvm.org/D30243

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296897 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/UnrollLoop.h
lib/Transforms/Scalar/LoopUnrollPass.cpp
lib/Transforms/Utils/LoopUnrollPeel.cpp