Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ extern cl::opt<bool> EnableMaskedGatherScatters;

extern cl::opt<unsigned> MVEMaxSupportedInterleaveFactor;

static cl::opt<int> ArmForceUnrollThreshold(
"arm-force-unroll-threshold", cl::init(12), cl::Hidden,
cl::desc(
"Threshold for forced unrolling of small loops in Arm architecture"));

/// Convert a vector load intrinsic into a simple llvm load instruction.
/// This is beneficial when the underlying object being addressed comes
/// from a constant, since we get constant-folding for free.
Expand Down Expand Up @@ -2731,7 +2736,7 @@ void ARMTTIImpl::getUnrollingPreferences(Loop *L, ScalarEvolution &SE,

// Force unrolling small loops can be very useful because of the branch
// taken cost of the backedge.
if (Cost < 12)
if (Cost < ArmForceUnrollThreshold)
UP.Force = true;
}

Expand Down