mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 17:24:48 +00:00
Cost Model: Move the 'max unroll factor' variable to the TTI and add initial Cost Model support on ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171928 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -116,9 +116,6 @@ static const unsigned RuntimeMemoryCheckThreshold = 4;
|
||||
/// This is the highest vector width that we try to generate.
|
||||
static const unsigned MaxVectorSize = 8;
|
||||
|
||||
/// This is the highest Unroll Factor.
|
||||
static const unsigned MaxUnrollSize = 4;
|
||||
|
||||
namespace {
|
||||
|
||||
// Forward declarations.
|
||||
@ -2715,6 +2712,8 @@ LoopVectorizationCostModel::selectUnrollFactor(bool OptForSize,
|
||||
UF = std::min(UF, (MaxLoopSizeThreshold / R.NumInstructions));
|
||||
|
||||
// Clamp the unroll factor ranges to reasonable factors.
|
||||
unsigned MaxUnrollSize = TTI.getMaximumUnrollFactor();
|
||||
|
||||
if (UF > MaxUnrollSize)
|
||||
UF = MaxUnrollSize;
|
||||
else if (UF < 1)
|
||||
|
Reference in New Issue
Block a user