aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/Module.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@outlook.com>2021-06-28 08:56:08 -0700
committerAlexey Bataev <a.bataev@outlook.com>2021-07-08 11:53:30 -0700
commit0d74fd3fdf5013e72c9c1682a284b8de7973a805 (patch)
tree62de5fb50fdc21e40e208e1a13f6649df4ee8264 /clang/lib/Basic/Module.cpp
parent6dd94cbff55afeb1b9692d0f21d08b79eae16a29 (diff)
downloadllvm-0d74fd3fdf5013e72c9c1682a284b8de7973a805.zip
llvm-0d74fd3fdf5013e72c9c1682a284b8de7973a805.tar.gz
llvm-0d74fd3fdf5013e72c9c1682a284b8de7973a805.tar.bz2
[SLP][COST][X86]Improve cost model for masked gather.
Revived D101297 in its original form + added some changes in X86 legalization cehcking for masked gathers. This solution is the most stable and the most correct one. We have to check the legality before trying to build the masked gather in SLP. Without this check we have incorrect cost (for SLP) in case if the masked gather is not legal/slower than the gather. And we're missing some vectorization opportunities. This can be fixed in the cost model, but in this case we need to add special checks for the cost of GEPs for ScatterVectorize node, add special check for small trees, etc., i.e. there are a lot of corner cases here and there, which insrease code base and make it harder to maintain the code. > Can't we rely on cost model to deal with this? This can be profitable for futher vectorization, when we can start from such gather loads as seed. The question from D101297. Actually, no, it can't. Actually, simple gather may give us better result, especially after we started vectorization of insertelements. Plus, like I said before, the cost for non-legal masked gathers leads to missed vectorization opportunities. Differential Revision: https://reviews.llvm.org/D105042
Diffstat (limited to 'clang/lib/Basic/Module.cpp')
0 files changed, 0 insertions, 0 deletions