This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Putting target-dependent global state into switchable structures
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, rdsandiford at googlemail dot com
- Date: Sun, 27 Jun 2010 00:15:41 +0200
- Subject: Re: RFC: Putting target-dependent global state into switchable structures
- References: <87pqzdegwc.fsf@firetop.home> <4C265CE0.6010407@codesourcery.com>
On Sat, Jun 26, 2010 at 10:02 PM, Mark Mitchell <mark@codesourcery.com> wrote:
> Richard Sandiford wrote:
>
>> I've got a series of patches that speed up the switching process by
>> avoiding target_reinit. ?Rather than spam the list with the entire
>> series now, I thought I'd better ask for feedback on the general approach.
>
> I think this is entirely sensible. ?It's a step towards a more modular
> compiler, and we all know that we need that. ?I'll be happy to help
> review the patches as necessary once you're ready.
Well. I don't like the idea of using .def files and a generator program.
In fact we are happily using no .def files for target hooks.
So why not have a target-independent piece of the structure definition
and a target macro implementing a target specific piece in it. Thus,
sth like
struct globals {
...
TARGET_GLOBALS;
};
and targets can define that if they need target specific globals.
Using .def files is over-engineering here IMHO and I do not see any
advantage in using it.
Richard.
> Thanks,
>
> --
> Mark Mitchell
> CodeSourcery
> mark@codesourcery.com
> (650) 331-3385 x713
>