[PATCH] D99174: [ARM] Enable UpperBound unrolling for all loops
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 24 00:35:39 PDT 2021
dmgreen added inline comments.
================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:2130
UP.PartialOptSizeThreshold = 0;
if (L->getHeader()->getParent()->hasOptSize())
return;
----------------
SjoerdMeijer wrote:
> ... here we check of Oz and Os. So we could bail here, but still set UpperBound to true. Is that correct or what we want?
The loop unroller will already handle Oz and Os correctly, and I think these values are already the same as the defaults it has.
The loop unroller will only unroll loops if it thinks the size will be less after unrolling than the size of the loop. So very rarely, and usually only for loops with 1 or 2 iterations.
UpperBound should not change that and should be safe to always enable.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99174/new/
https://reviews.llvm.org/D99174
More information about the llvm-commits
mailing list