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

Re: Proposed major change to combine


On Thu, Mar 08, 2001 at 04:32:53PM +0100, Torbjorn Granlund wrote:
> kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:
>   
>       The would open to allow define_split that generate more insns than
>       they "consume".
>   
>   I'm sorry: why would that be useful?  Can you give me an example?
>   
> Whenever three insns are cheaper than two insns,
> the three insns would be better.

But you can already do that with define_split.  For example consider splitting
a DI add:

	(define_split
	  [(set (match_operand:DI 0 "register_operand" "=r")
		(plus:DI (match_operand:DI 1 "register_operand" "r")
			 (match_operand:DI 2 "reg_or_diint_operand" "rI")))]
	  ""
	  [(match_dup 3)]
	  "operands[3] = expand_diadd (operands);")

Expand_diadd then returns a SEQUENCE with the appropriate insns inside of it
using start_sequence, gen_sequence, end_sequence.

-- 
Michael Meissner, Red Hat, Inc.  (GCC group)
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482


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