[PATCH] D18830: [llvm] GVN.cpp: Do not swap when both LHS and RHS are arguments.

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 7 08:17:16 PDT 2016


I think his point is more the same one i made: "we shouldn't have to swap
at all, and if we do, we should fix that"

On Thu, Apr 7, 2016 at 7:46 AM, Aditya Kumar <hiraditya at msn.com> wrote:

> hiraditya added a comment.
>
> In http://reviews.llvm.org/D18830#394173, @chandlerc wrote:
>
> > Please don't avoid extra work in this way IMO, unless you have a very
> significant compile time hit due to this.
> >
> > We have a pervasive reliance on canonicalizing constants to the RHS of
> binary operations so those should be exceedingly rare anyways. We shouldn't
> fight that, we should run with it.
> >
> > My two cents. If Danny, Chad, or others working more on GVN disagree,
> they can happily override me. =D
>
>
> Thanks for the feedback. This patch will not change the order of
> preference (RHS should keep Constants/Arguments). it only prevents swap
> when both LHS and RHS are Arguments.
>
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D18830
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160407/30c17e52/attachment.html>


More information about the llvm-commits mailing list