[PATCH] D37762: [InstCombine] Remove single use restriction from InstCombine's explicit sinking code.
Aditya Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 14 05:21:32 PDT 2018
hiraditya added a comment.
In https://reviews.llvm.org/D37762#868790, @davide wrote:
> I think what matters in this case is the {post}dominance relation between the block of the DEF and the block(s) [potentially > 1] of the USEs.
Agreed with this.
> Doing this xform when all the uses are in the same block, is, correct, but restrictive. So, I think your logic is fine, but this makes me still less convinced that we shouldn't use the dom to drive this analysis (and therefore should be a separate pass :)
I think GVNSink could be improved to do this. Also the current implementation in InstCombiner looks like a hack. We are sinking an instruction without appropriate cost model. Delaying execution of an instruction may not always be a good idea.
https://reviews.llvm.org/D37762
More information about the llvm-commits
mailing list