[PATCH] D99174: [ARM] Enable UpperBound unrolling for all loops
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 24 01:55:57 PDT 2021
SjoerdMeijer accepted this revision.
SjoerdMeijer added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:2130
UP.PartialOptSizeThreshold = 0;
if (L->getHeader()->getParent()->hasOptSize())
return;
----------------
dmgreen wrote:
> 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.
Okidoki, thanks, LGTM.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99174/new/
https://reviews.llvm.org/D99174
More information about the llvm-commits
mailing list