[PATCH] D115261: [LV] Disable runtime unrolling for vectorized loops.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 7 09:21:51 PST 2021
fhahn created this revision.
fhahn added reviewers: Ayal, gilr, reames, dmgreen, lebedev.ri.
Herald added a subscriber: hiraditya.
fhahn requested review of this revision.
Herald added a project: LLVM.
This patch adds metadata to disable runtime unrolling to the vectorized
loop. If runtime unrolling/interleaving is considered profitable, LV
will interleave the loop directly. There should be no need to perform
runtime unrolling at a later stage.
Note that we already add metadata to disable runtime unrolling to the
scalar loop after vectorization.
The additional unrolling unnecessarily increases code size and compile
time. In addition to that we have several bug reports of unncessary
runtime unrolling for vectorized loops, e.g. PR40961
Compile-time improvements:
NewPM-O3: -2.08%
NewPM-ReleaseThinLTO: -1.09%
NewPM-ReleaseLTO-g: -1.59%
http://llvm-compile-time-tracker.com/compare.php?from=398dffd4ffc7cbc320e15207c8c04ca682d821c4&to=86c8f5499f5c9ef34d018491f8eb4364579dca16&stat=instructions
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D115261
Files:
llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
llvm/test/Transforms/LoopVectorize/AArch64/sve-vector-reverse.ll
llvm/test/Transforms/LoopVectorize/ARM/mve-qabs.ll
llvm/test/Transforms/LoopVectorize/ARM/tail-folding-loop-hint.ll
llvm/test/Transforms/LoopVectorize/ARM/tail-folding-scalar-epilogue-fallback.ll
llvm/test/Transforms/LoopVectorize/X86/already-vectorized.ll
llvm/test/Transforms/LoopVectorize/X86/float-induction-x86.ll
llvm/test/Transforms/LoopVectorize/X86/gather_scatter.ll
llvm/test/Transforms/LoopVectorize/X86/invariant-store-vectorization.ll
llvm/test/Transforms/LoopVectorize/X86/masked_load_store.ll
llvm/test/Transforms/LoopVectorize/X86/tail_loop_folding.ll
llvm/test/Transforms/LoopVectorize/invariant-store-vectorization-2.ll
llvm/test/Transforms/LoopVectorize/memdep-fold-tail.ll
llvm/test/Transforms/LoopVectorize/pr45679-fold-tail-by-masking.ll
llvm/test/Transforms/LoopVectorize/runtime-check-small-clamped-bounds.ll
llvm/test/Transforms/LoopVectorize/tail-folding-vectorization-factor-1.ll
llvm/test/Transforms/LoopVectorize/use-scalar-epilogue-if-tp-fails.ll
llvm/test/Transforms/LoopVectorize/vectorize-once.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115261.392435.patch
Type: text/x-patch
Size: 162936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211207/109949f1/attachment-0001.bin>
More information about the llvm-commits
mailing list