[comp.compilers] GCC question --> RTL and code generation

singhvk@eecg.toronto.edu (Vijaya Singh (Vij)) (12/11/90)

Hi,

A quick question regarding GCC's RTL generation and assembler
code generation...

IS THE FOLLOWING CORRECT???
(Inferred from browsing the GCC manual, if I'm wrong PLEASE let
me know!! --> thanks!)

*******************************************************************
The "machine.md" file generally contains 4 kinds of expressions:

	1) (define_insn "name" ...) 	ie: with optional name
	2) (define_insn "" ...)		ie: without optional name
	3) (define_expand "name" ...)
	4) (define_peephole ...)

RTL generation uses 1,3
Code generation uses 1,2,4

TYPE 1 is used both for RTL generation (when "name" is required)
and for code generation (when RTL template is matched).
TYPE 2 is used only for code generation (when RTL template is
matched).  This type can be used to generate more efficient code.
TYPE 3 is used only for RTL generation (when "name" is required).
This type is used when "name" requires more than one RTL insns.
TYPE 4 is used only for code generation (when RTL insn-pattern vector
is matched).  This type is used for replacing a sequence of RTL 
insns with one.
*******************************************************************

Thanks,

	VIJ...

--
Vijaya Singh, Department of Electrical Engineering, University Of Toronto
VOICE: (416) 978-1653, FAX:   (416) 978-7423
EMAIL: singhvk@eecg.toronto.edu
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.