[Loop Peeling] Add possibility to enable peeling on loop nests.
authorArkady Shlykov <arkady.shlykov@intel.com>
Fri, 17 Jan 2020 13:35:19 +0000 (05:35 -0800)
committerArkady Shlykov <arkady.shlykov@intel.com>
Mon, 2 Mar 2020 16:37:11 +0000 (08:37 -0800)
commit3dcaf296aeb0d06bcb8f6e7fb661573d6e01d90c
treec61aec0a5c55d6158baeaba941acefdc820ae7f3
parent78f9e5d098af95610f4542ee41479d7931261066
[Loop Peeling] Add possibility to enable peeling on loop nests.

Summary:
Current peeling implementation bails out in case of loop nests.
The patch introduces a field in TargetTransformInfo structure that
certain targets can use to relax the constraints if it's
profitable (disabled by default).
Also additional option is added to enable peeling manually for
experimenting and testing purposes.

Reviewers: fhahn, lebedev.ri, xbolva00

Reviewed By: xbolva00

Subscribers: RKSimon, xbolva00, hiraditya, zzheng, llvm-commits

Differential Revision: https://reviews.llvm.org/D70304
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/include/llvm/Transforms/Utils/LoopUtils.h
llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp
llvm/lib/Transforms/Utils/LoopUtils.cpp
llvm/test/Transforms/LoopUnroll/peel-loop-conditions.ll
llvm/test/Transforms/LoopUnroll/peel-loop-nests.ll [new file with mode: 0644]