[Loop Peeling] Introduce an option for profile based peeling disabling.
authorSerguei Katkov <serguei.katkov@azul.com>
Fri, 2 Aug 2019 09:32:52 +0000 (09:32 +0000)
committerSerguei Katkov <serguei.katkov@azul.com>
Fri, 2 Aug 2019 09:32:52 +0000 (09:32 +0000)
commitde67affd005d2a4af3554ff48f874868f022a022
tree74b3fbbbae871e91e2c8eabb87568816c2f947eb
parentac7864ec019c784b6039eda6a77c678f7b417591
[Loop Peeling] Introduce an option for profile based peeling disabling.

This patch adds an ability to disable profile based peeling
causing the peeling of all iterations and as a result prohibits
further unroll/peeling attempts on that loop.

The motivation to get an ability to separate peeling usage in
pipeline where in the first part we peel only separate iterations if needed
and later in pipeline we apply the full peeling which will prohibit further peeling.

Reviewers: reames, fhahn
Reviewed By: reames
Subscribers: hiraditya, zzheng, dmgreen, llvm-commits
Differential Revision: https://reviews.llvm.org/D64983

llvm-svn: 367668
llvm/include/llvm/Transforms/Scalar/LoopUnrollPass.h
llvm/include/llvm/Transforms/Utils/UnrollLoop.h
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp
llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
llvm/test/Transforms/LoopUnroll/peel-loop-pgo-deopt.ll