This is the mail archive of the
mailing list for the GCC project.
Re: [RTL] Canonicalize commutative operations more
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Marc Glisse <marc dot glisse at inria dot fr>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 27 Mar 2013 11:01:07 +0100
- Subject: Re: [RTL] Canonicalize commutative operations more
- References: <alpine dot DEB dot 2 dot 02 dot 1303191715280 dot 4515 at stedding dot saclay dot inria dot fr>
> This patch passes bootstrap+testsuite on x86_64-linux-gnu. Using the
> opposite arbitrary order in compare_commutative_operands_precedence
> (exchange x and y in the line with GET_CODE) passes as well. The
> simplify-rtx bit is because I get an infinite recursion otherwise.
> Surprisingly, that infinite recursion occurs only in var-tracking, and
> only for a single file in bootstrap+testsuite (not the same one depending
> on the arbitrary order). I am not sure that is the best place to break the
> recursion, but it seems to work.
> I don't really expect the patch to be accepted as is, but it seems good
> enough to start the conversation.
I'm rather with Jakub here, I think that arbitrary canonicalization as the one
proposed here will probably be worse than no canonicalization in practice,
because it will generate much shuffling. If you need more canonicalization,
then why not propose new, precise canonicalization rules?