This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: .def files for insn and reg notes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]