[PATCH] D105207: [debuginfo][lsr] SCEV-based salvaging for LoopStrengthReduction
Chris Jackson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 21 02:18:22 PDT 2021
chrisjackson updated this revision to Diff 360392.
chrisjackson added a comment.
This change improves the selection of the IV, by using the PHi node inserted by ScalarEvolutionExpander, which is typically called "%lsr.iv" or similar. The decision to do this resulted from analysis of a build of clang3.4. While the previous method of using Loop->getInductionVariable()/getCanonicalInductionVariable() provided correct IVs, these tended to be relatively short lived and were often optimised away by subsequent passes. Some care is needed in using this PHi as ScalarEvolutionExpander holds Maps of handles to the new PHi node.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105207/new/
https://reviews.llvm.org/D105207
Files:
llvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h
llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
llvm/test/Transforms/LoopStrengthReduce/dbg-preserve-0.ll
llvm/test/Transforms/LoopStrengthReduce/dbg-preserve-2.ll
llvm/test/Transforms/LoopStrengthReduce/debuginfo-scev-variadic-value-0.ll
llvm/test/Transforms/LoopStrengthReduce/debuginfo-scev-variadic-value-2.ll
llvm/test/Transforms/LoopStrengthReduce/debuginfo-scev-variadic-value-3.ll
llvm/test/Transforms/LoopStrengthReduce/debuginfo-scev-variadic-value-4.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105207.360392.patch
Type: text/x-patch
Size: 47779 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210721/2c344d20/attachment.bin>
More information about the llvm-commits
mailing list