This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Add .def file for public target instructions
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Trevor Saunders <tbsaunde at tbsaunde dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Mikhail Maltsev <maltsevm at gmail dot com>, Richard Sandiford <rdsandiford at googlemail dot com>
- Date: Wed, 1 Jul 2015 11:52:59 +0200
- Subject: Re: Add .def file for public target instructions
- Authentication-results: sourceware.org; auth=none
- References: <87ioaegtcp dot fsf at googlemail dot com> <20150701093910 dot GB11111 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com>
On Wed, Jul 1, 2015 at 11:39 AM, Trevor Saunders <tbsaunde@tbsaunde.org> wrote:
> On Tue, Jun 23, 2015 at 07:41:42PM +0100, Richard Sandiford wrote:
>> [A fair bit later than promised, sorry...]
>>
>> Mikhail posted a patch to make genflags generate the default HAVE_foo
>> and gen_foo definitions that have recently been added to defaults.h:
>>
>> https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00723.html
>>
>> I agree it'd be a good idea to generate this kind of thing automatically,
>> but I think we should take the opportunity to move the interface to the
>> target structure. I.e.:
>>
>> HAVE_foo -> targetm.have_foo ()
>> gen_foo -> targetm.gen_foo ()
>>
>> This should move us closer to the pipedream goal of supporting multiple
>> targets at once. It should also mean that only the target code depends
>> on insn-flags.h.
>
> using targetm. certainly seems like an improvement. I wonder if it
> would be faster to stick this data on a per function object. I think
> that would mean you could compute what insns are available once when the
> function is created and afterwards all checks would only needed to be
> reading computed values.
I think the memory cost of this is prohibitive.
Richard.
> Trev
>