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: sh64-elf (SH5) port


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


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