[PATCH] D27321: Fix LSR ImmCost calculation for profitable chains
Evgeny Stupachenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 1 14:11:10 PST 2016
evstupac created this revision.
evstupac added a reviewer: qcolombet.
evstupac added subscribers: llvm-commits, anna, wmi, hfinkel.
evstupac set the repository for this revision to rL LLVM.
Herald added a subscriber: mzolotukhin.
For the following case:
for(j = 0; j < n; j++) {
s += *(in++);
s += *(in++);
}
LSR consider "in" as profitable chain and do count ImmCost only for first load.
However when we have a base set before the loop
in += 1024;
ImmCost could be a significant value.
Repository:
rL LLVM
https://reviews.llvm.org/D27321
Files:
lib/Transforms/Scalar/LoopStrengthReduce.cpp
test/Transforms/LoopStrengthReduce/X86/imm-cost.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27321.79976.patch
Type: text/x-patch
Size: 6367 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161201/e7f755ea/attachment.bin>
More information about the llvm-commits
mailing list