[LoopUnroll] Enable PGO-based loop peeling by default.

This enables peeling of loops with low dynamic iteration count by default,
when profile information is available.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295796 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael Kuperstein
2017-02-22 00:27:34 +00:00
parent 7d9379397a
commit 2b21febc6b
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -110,7 +110,7 @@ static cl::opt<unsigned> FlatLoopTripCountThreshold(
"aggressively unrolled."));
static cl::opt<bool>
UnrollAllowPeeling("unroll-allow-peeling", cl::Hidden,
UnrollAllowPeeling("unroll-allow-peeling", cl::init(true), cl::Hidden,
cl::desc("Allows loops to be peeled when the dynamic "
"trip count is known to be low."));
@@ -155,7 +155,7 @@ static TargetTransformInfo::UnrollingPreferences gatherUnrollingPreferences(
UP.AllowExpensiveTripCount = false;
UP.Force = false;
UP.UpperBound = false;
UP.AllowPeeling = false;
UP.AllowPeeling = true;
// Override with any target specific settings
TTI.getUnrollingPreferences(L, UP);
+1 -1
View File
@@ -1,4 +1,4 @@
; RUN: opt < %s -S -debug-only=loop-unroll -loop-unroll -unroll-allow-peeling 2>&1 | FileCheck %s
; RUN: opt < %s -S -debug-only=loop-unroll -loop-unroll 2>&1 | FileCheck %s
; REQUIRES: asserts
; Make sure we use the profile information correctly to peel-off 3 iterations