Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion llvm/include/llvm/CodeGen/BasicTTIImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,13 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
if (PartialUnrollingThreshold.getNumOccurrences() > 0)
MaxOps = PartialUnrollingThreshold;
else if (ST->getSchedModel().LoopMicroOpBufferSize > 0)
MaxOps = ST->getSchedModel().LoopMicroOpBufferSize;
// Upper bound by the default PartialThreshold, which is the same as
// the default full-unroll Threshold. Even if the loop micro-op buffer
// is very large, this does not mean that we want to unroll all loops
// to that length, as it would increase code size beyond the limits of
// what unrolling normally allows.
MaxOps = std::min(ST->getSchedModel().LoopMicroOpBufferSize,
UP.PartialThreshold);
else
return;

Expand Down
Loading