[PATCH] D12886: Clean up: Refactoring the hardcoded value of 6 for FindAvailableLoadedValue()'s parameter MaxInstsToScan.

Nick Lewycky via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 09:48:59 PDT 2015


On 17 September 2015 at 22:25, Larisse Voufo <lvoufo at gmail.com> wrote:

> lvoufo added a comment.
>
>
>
> > -2-
>
> >  Does "opt -basicaa -gvn" clean up the redundant load? If so, is it okay
> that instcombine doesn't?
>
>
> Now it does, as of Diff 35065 of http://reviews.llvm.org/D11826.


Is that the correct link? That appears to introduce a new LLVM IR feature
that changes both clang and llvm. If the transform is legal for instcombine
to do, then it's also legal for gvn to do with no new IR features involved.

But it still does not make it okay imo since once might still expect
> something like "-basicaa -instcombine -inline -early-cse -instcombine" to
> remove redundant loads when
> "-basicaa -instcombine -early-cse -instcombine" does.
>

Well, yeah. I think it's unreasonable to expect instcombine to hack on your
loads, but it does and I'll just move right along. What would surprise me
is if instcombine folded redundant loads that gvn couldn't. That would
suggest a problem in gvn...


> http://reviews.llvm.org/D12886
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150918/1099c0fd/attachment.html>


More information about the llvm-commits mailing list