Skip to content

Commit 2677953

Browse files
committed
Set DefaultUnrollRuntimeCount to 4 for in-oder
1 parent af8e955 commit 2677953

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2565,6 +2565,10 @@ void RISCVTTIImpl::getUnrollingPreferences(Loop *L, ScalarEvolution &SE,
25652565
// taken cost of the backedge.
25662566
if (Cost < 12)
25672567
UP.Force = true;
2568+
2569+
// Set a lower runtime unrolling count for in-order models.
2570+
if (!ST->getSchedModel().isOutOfOrder())
2571+
UP.DefaultUnrollRuntimeCount = 4;
25682572
}
25692573

25702574
void RISCVTTIImpl::getPeelingPreferences(Loop *L, ScalarEvolution &SE,

0 commit comments

Comments
 (0)