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: rtl generation & predicates


On Fri, Feb 23, 2001 at 06:56:24PM +0000, Joern Rennecke wrote:
> > it's not that i confused between a predicate and a constraint. but the
> > INSN_CODE field of an insn that appears at the filename.rtl dump has a
> > value -1, which means, acc to the documentation (section: RTL
> > Representation, subsection: Insns): 
> > 
> > INSN_CODE (i)
> >        An integer that says which pattern in the machine description
> > matches this insn, or -1 if the matching has not yet been attempted.
> > 
> > as i assumed the only use of predicates is during matching, predicates
> > shud not have any role to play during RTL generation.
> 
> Predicates are used during rtl generation in general.  However, they
> are not applied when you use the gen_* function for the insn.

More to the point, the gen_* functions assume the caller has already called the
appropriate predicate functions, and adpopted alternative codegen strategies if
the predicates failed, such as copying the argument to a pseudo registers.

-- 
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]