This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Tue, 2 Apr 2013, Eric Botcazou wrote:
I am not sure about adding just a few rules. If I just say that lshift is stronger than rshift, the relation is not an order (transitive) anymore.Why? Can't you give them precedences in commutative_operand_precedence that preserve the transitivity?
I can, but then I am giving lshift higher priority than every other operation, not just rshift. And if I want to give (vec_select x 0) a higher precedence than (vec_select x 1) but lower than (vec_select (vec_concat a b) 1), the weights may become complicated, whereas the comparison function could just recurse. But I understand that it has advantages over an arbitrary order, so if I ever feel the need again I will try to play with precedence values.
I might also experiment with the new transformation feature of .md files to write a pattern once and have it expand to 2 patterns for the 2 orders.
The fear (at least mine) is that, by canonicalizing everything, you will make changes behind the back of back-ends that could disable some of their patterns silently.
I wonder if those issues might in most cases be bugs in the back-ends (optimizations missed depending on the order), that the canonicalization would make more noticable (and thus easier to fix).
-- Marc Glisse
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |