This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: .def files for insn and reg notes
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Graham Stott <graham dot stott at btinternet dot com>
- Cc: Eric Botcazou <ebotcazou at libertysurf dot fr>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 20 Sep 2004 08:44:39 -0700
- Subject: Re: .def files for insn and reg notes
- References: <87d61onkqk.fsf@codesourcery.com><200409201015.11171.ebotcazou@libertysurf.fr><414EA39A.2060903@btinternet.com>
Graham Stott <graham.stott@btinternet.com> writes:
> Zack Weinberg wrote:
>>There appears to have been no good reason why the reg_note enumeration
>>began at 1.
>
> GCC code is somewhat lax in how it uses the mode field within EXPR_LIST
> and INSN_LIST.
>
> reg notes definately can't start a zero as it will conflict with the use of
> VOIDmode for true data dependence! ANTI and OUTPUT dependence use proper
> reg notes.
>
> Besides REG_NOTES themselves we also store 0, VOIDmode, SImode, and
> DImode, and perhaps a few others I've yet to notice.
>
> ps. I've been working on a patch to add a proper REG_DEP_TRUE
> note to replace the use of VOIDmode for true data dependence. It's
> proving tricky to find all the relevant 0 and VOIDmode uses in the
> middle and backends.
Eric Botcazou <ebotcazou@libertysurf.fr> writes:
>
> REG_DEAD is now mapped to VOIDmode, which means that the patch has eliminated
> all REG_DEAD notes from the RTL dumps:
>
> (insn:HI 9509 9508 9507 0 (set (reg:DI 6214)
> (ashift:DI (reg:DI 6213)
> (const_int 32 [0x20]))) 303 {*ashldi3_sp64} (insn_list 9508
> (insn_list:REG_DEP_ANTI 9503 (nil)))
> (expr_list (reg:DI 6213)
> (nil)))
>
> Please bring them back! :-)
So how about I fix print-rtl.c, and I also add REG_DEP_TRUE to
reg-notes.def with value 0? Then the middle and backends can be
incrementally mutated to use REG_DEP_TRUE instead of 0 or VOIDmode.
I'm worried about the use of SI and DImode in this context. What do
they mean?!
zw