[PATCH] D67805: [LV] Allow vectorization of hot short trip count loops with epilog.
Evgeniy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 20 01:14:14 PDT 2019
ebrevnov created this revision.
Herald added subscribers: llvm-commits, rkruppe, zzheng, hiraditya.
Herald added a project: LLVM.
Currently we reject to vectorize loops with epilog if trip count less than 16 (as defined by TinyTripCountVectorThreshold) and loop is cold accoriding to profile. Thus in absence of profile summary information we will never vectorize such loops even if cost model can prove profitability. With this change we try to improve the situation by using block execution count information (if available) to judge if loop is hot relativly to function entry.
Idealy we should be using loop size and expected perf gain from cost model in addition to loop hotness to make the decicion but that would be much bigger change and can be a follow up step.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D67805
Files:
llvm/include/llvm/Transforms/Utils/SizeOpts.h
llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp
llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
llvm/lib/Transforms/Utils/SizeOpts.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/hot_short_tc_loop.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67805.220961.patch
Type: text/x-patch
Size: 21738 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190920/c8c800d7/attachment.bin>
More information about the llvm-commits
mailing list