[PATCH] D95125: [WebAssembly] Enable loop unrolling
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 25 02:40:21 PST 2021
samparker added a comment.
> I'm inclined to merge this and leave it to users for whom the code size increase is unacceptable to use -Os/-Oz/-fno-unroll-loops to disable it.
The unrolling would be disabled at -Os and -Oz, see
// Avoid unrolling when optimizing for size.
UP.OptSizeThreshold = 0;
UP.PartialOptSizeThreshold = 0;
> Is it possible to do this in -O3 but not -O2 or -O1?
AFAIK, loop unrolling is disabled at -O1 for all targets. I don't think there's currently a backend mechanism to make a decision on the opt level, but the loop unroller uses them to adjust thresholds to be more aggressive in some situations.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95125/new/
https://reviews.llvm.org/D95125
More information about the llvm-commits
mailing list