[PATCH] D51584: [IndVars] Smart hard uses detection
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 3 02:42:57 PDT 2018
mkazantsev created this revision.
mkazantsev added reviewers: wmi, sanjoy, reames, atrick.
When rewriting loop exit values, IndVars considers this transform not profitable if
the loop instruction has a loop user which it believes cannot be optimized away.
In current implementation only calls that immediately use the instruction are considered
as such.
This patch extends the definition of "hard" users to any side-effecting instructions
(which usually cannot be optimized away from the loop) and also allows handling
of not just immediate users, but use chains.
https://reviews.llvm.org/D51584
Files:
lib/Transforms/Scalar/IndVarSimplify.cpp
test/Analysis/ScalarEvolution/pr28705.ll
test/Transforms/IndVarSimplify/dont-recompute.ll
test/Transforms/IndVarSimplify/lrev-existing-umin.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51584.163675.patch
Type: text/x-patch
Size: 7591 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180903/cda54085/attachment.bin>
More information about the llvm-commits
mailing list