mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 15:13:49 -04:00
[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:
@@ -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,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
|
||||
|
||||
Reference in New Issue
Block a user