This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: sh64-elf (SH5) port
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: 05 Feb 2002 15:37:32 -0200
- Subject: Re: sh64-elf (SH5) port
- Organization: GCC Team, Red Hat
- References: <3523723089.1012841037@localhost>
On Feb 4, 2002, Mark Mitchell <mark@codesourcery.com> wrote:
> I don't really think the OVERRIDE_OPTIONS approach is that ugly.
We should probably move stuff from OVERRIDE_OPTIONS into a targetm
hook, that would be called at the same point. This would address my
issue regarding the spreading of this information across multiple
files, which is my real problem with the current set up.
> But, changing from one mode to the other is a pretty simple
> exercise, compared to the work required to get the macros turned
> into functions.
Indeed. But the earlier we do it, the better.
> The bigger wins come from the fact that we reduce the likelihood of
> breaking other configurations
I don't see it as a result of moving from macros to functions. We
could achieve the same result by doing away with #ifdef for those
macros, and having them set to the appropriate default in defaults.h.
Using macros (or inline functions) would give more opportunity for the
compiler to optimize itself, too, but, as soon as you get a pointer to
the function into a global structure, you miss the opportunity of
inlining.
> increase the self-documentation available, and so forth.
This is also a matter of policy. Both macros and target hooks are
supposed to be documented in their generic purpose, as well as in
their specific behavior in target files. I don't see how turning them
from macros to functions would magically self-document them :-)
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer