This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Confused about rtl generation
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: marty dot hauff at rmit dot edu dot au
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 27 Jun 03 09:07:31 EDT
- Subject: Re: Confused about rtl generation
Let me make sure I understand this... If I call recog() just after the
initial RTL generation pass (around when .00.rtl is written and prior
to optimizations etc.) this routine should fill in the insn ids with
the same code as the insn that was used to create the rtl originally?
No.
(1) recog returns an insn code, but doesn't set anything to it.
(2) The insn code returned is that of the first pattern in the MD file that
matches the insn. This may or may not be the pattern that was used to
create it. It is quite common to have a define_expand to create an insn
and then have an "unnamed" (meaning no name or a name starting with a '*')
define_insn to match it. Nearly all the mov patterns on most machines
work this way, for example.