Skip to content

Commit b45bf77

Browse files
committed
Set DefaultUnrollRuntimeCount to 4 for in-oder
1 parent 52e3931 commit b45bf77

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
@@ -2652,6 +2652,10 @@ void RISCVTTIImpl::getUnrollingPreferences(
26522652
// taken cost of the backedge.
26532653
if (Cost < 12)
26542654
UP.Force = true;
2655+
2656+
// Set a lower runtime unrolling count for in-order models.
2657+
if (!ST->getSchedModel().isOutOfOrder())
2658+
UP.DefaultUnrollRuntimeCount = 4;
26552659
}
26562660

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

0 commit comments

Comments
 (0)