[all-commits] [llvm/llvm-project] eb4613: [SLP] Make sure instructions are ordered when comp...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Fri Jul 3 09:30:59 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: eb46137daa92723b75d828f2db959f2061612622
https://github.com/llvm/llvm-project/commit/eb46137daa92723b75d828f2db959f2061612622
Author: Florian Hahn <flo at fhahn.com>
Date: 2020-07-03 (Fri, 03 Jul 2020)
Changed paths:
M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
M llvm/test/Transforms/SLPVectorizer/AArch64/spillcost-order.ll
Log Message:
-----------
[SLP] Make sure instructions are ordered when computing spill cost.
The entries in VectorizableTree are not necessarily ordered by their
position in basic blocks. Collect them and order them by dominance so
later instructions are guaranteed to be visited first. For instructions
in different basic blocks, we only scan to the beginning of the block,
so their order does not matter, as long as all instructions in a basic
block are grouped together. Using dominance ensures a deterministic order.
The modified test case contains an example where we compute a wrong
spill cost (2) without this patch, even though there is no call between
any instruction in the bundle.
This seems to have limited practical impact, .e.g on X86 with a recent
Intel Xeon CPU with -O3 -march=native -flto on MultiSource,SPEC2000,SPEC2006
there are no binary changes.
Reviewers: craig.topper, RKSimon, xbolva00, ABataev, spatel
Reviewed By: ABataev
Differential Revision: https://reviews.llvm.org/D82444
More information about the All-commits
mailing list