On Sun, Jan 18, 2015 at 04:26:27PM -0500, Hans-Peter Nilsson wrote:
> For targets where most insns set condition-codes (and that don't
> use the deprecated CC0-machinery), those insns will always be
> expressed using a parallel with (most often) two members, one
> being the "main" part of the insn and the other either a
> (clobber (reg:CC ...)) or a (set (reg:CC ...) ...).
> 
> There, it doesn't make sense to have a different canonical
> order.  For example: people have already brought up error-prone
> operand renumbering as a problem, from the perspective of
> changing *from* the compare-elim (aka. swapped) order.

You don't need to renumber operands, operand numbers can be in
any order.  A big nuisance though is having to move all your
match_dups and match_operands around (the latter should be first
always).

Although that can be fixed in gen* as well of course.

> Conversely, if it was declared canonical, you'd have to more
> often perform otherwise needless operand renumbering in bodies
> of define_expand's and define_insns (where you hopefully use
> e.g. define_subst to avoid pattern explosion), when you need to
> refer to the operands of the "main", non-cc part, for both the
> set and the clobber substitution.

I wish I could use define_subst, but it a) is not generic enough
for most uses, and b) does not handle splitters at all :-(
That is something for a different discussion though.


Segher

Reply via email to