This is the mail archive of the
mailing list for the GCC project.
Re: make genattrtab generate smaller code
- From: law at redhat dot com
- To: Michael Matz <matz at suse dot de>
- Cc: Alexandre Oliva <aoliva at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 08 Sep 2003 07:56:55 -0600
- Subject: Re: make genattrtab generate smaller code
- Reply-to: law at redhat dot com
In message <Pine.LNX.email@example.com>, Michael Ma
>> My only concern is that this actually changes the behavior of the
>> program, in that it may cause attr functions to be called with insns
>> that would previously never have that function called for them.
>Correct. But that would mean the author of the .md file relied on
>undocumented behaviour. And given that get_attr_aaa() needs to return
>sensible results when called from toplevel (i.e. either from the emitters
>or the scheduler, or whatever) they should also return sensible results
>when called from inside other get_attr() functions.
>In addition when and how the get_attr() are called from inside other
>get_attr() currently totally depends on the expression optimizer in
>genattrtab, which also depends on the actual insn patterns and
>define_attr(), hence this was unstable anyway. So I think the chance of
>this change breaking some .md files should be small, although of course I
>don't know. It's theoretically possible in which case I think we should
>define the .md file to be wrong.
It has always been the case that callers of get_attr_xxx have had to
pre-filter out things like CLOBBERs, USEs and SEQUENCEs (ie, things which
are not recognizable insns).
Now, one could argue that's a lame interface and that the get_attr_xxx
functions should do something sensible with those non-recognizable
insns. That would allow for some minor cleanups.