This is the mail archive of the 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]

Re: PATCH RFA: Change MIPS ffs<mode>2 from define_insn to define_expand

Nice analysis again. ;)

Ian Lance Taylor <> writes:
> Of course, it would be even better if we expanded earlier, into trees,
> so that the instructions were exposed to the tree optimizers.  And for
> that matter this code is essentially generic and not really MIPS
> specific at all.

The second sentence is why I don't think this patch is a good idea.  I
don't want to see us add new target-independent expansions to the MIPS
backend.  If you want to change the way that ffs is implemented, please
either provide this expansion in the tree->rtl expanders or do it as
a tree-level reduction in the way you suggest.

(FWIW, a similar issue came up a while back wrt variable doubleword shifts.
I raised the same objection then (and ended up coding the middle-end
bits myself ;) so I hope I'm being vaguely consistent here.)

Like you say, the pattern was probably added to get "optimal" filling
of delay slots.  That meant keeping the instruction in one piece
until final, so a MIPS-specific pattern was justified in that
situation.  I don't think it is with this sort of approach.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]