[SLP] Optimize getSpillCost(); NFCI
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 9 Jul 2019 20:24:44 +0000 (20:24 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 9 Jul 2019 20:24:44 +0000 (20:24 +0000)
commit5ca39e828c893f6fa823ea0cc5f2a8b9e19cecc7
tree8306197f48871e61bf4776537004aa3f64447488
parent1366262b74ddbfe98fc1817f2ea9e3af451c4a05
[SLP] Optimize getSpillCost(); NFCI

For a given set of live values, the spill cost will always be the
same for each call. Compute the cost once and multiply it by the
number of calls.

(I'm not sure this spill cost modeling makes sense if there are
multiple calls, as the spill cost will likely be shared across
calls in that case. But that's how it currently works.)

llvm-svn: 365552
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp