[PATCH] D18830: [llvm] GVN.cpp: Do not swap when both LHS and RHS are arguments.
Aditya Kumar via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 7 07:46:32 PDT 2016
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
More information about the llvm-commits
mailing list