This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Unnamed pattern in .md file
- To: Desmond Cheung <dycheung at cs dot sfu dot ca>
- Subject: Re: Unnamed pattern in .md file
- From: Alan Lehotsky <lehotsky at tiac dot net>
- Date: Tue, 16 May 2000 22:52:24 -0400
- Cc: gcc at gcc dot gnu dot org
- References: <200005162304.QAA16183@ratbert.cs.sfu.ca>
At 4:04 PM -0700 5/16/00, Desmond Cheung wrote:
>Hi,
>
>I'm writing the configuration files (.md, .h, .c) for a machine.
>
>When do we define unnamed patterns in the .md file?
>Why do we need them? Just for optimization?
>Can the .md file be without any unnamed patterns?
>
>Thanks.
>
>Des
The only patterns that MUST be named are those that are used
to generate RTL from the front-end parser. These are all
described in the Porting GCC doc.
Otherwise, you name patterns if
1/ You want to be able to use them as construction subroutines
by calling gen_XXXX(op0, op1, ...) yourself - either from within
a named pattern that the front-ends know about, or by a splitter.
2/ You want to have a mnemonic handle on the pattern for
debugging.
Any code-generation pattern that matches RTL that was created
by a named pattern (frequently a define_expand), or that matches
a sequence of RTL created by one or more tree-to-RTL conversions
can be unnamed.
Off the top of my head, I can't think of any other reasons
to name patterns?
-- Al
--
------------------------------------------------------------------------
Quality Software Management
http://www.tiac.net/users/lehotsky
lehotsky@tiac.net
(978)287-0435 Voice
(978)808-6836 Cellular
(978)287-0436 Fax/Data
Software Process Improvement and Management Consulting
Language Design and Compiler Implementation