[tree-ssa][rfc] plans for nested functions

Linus Torvalds torvalds@osdl.org
Sat Sep 27 01:13:00 GMT 2003


Richard Henderson wrote:
>
> This is stuff that was running around my head this morning.
> I mostly wanted to write this down so that I don't forget...
> 
> The problem I'm trying to solve is that, at present, we have
> ordering issues wrt compilation of nested functions.
> 
> (1) We depend heavily on rtl-level state in order to compile
>     nested functions.

Why do you want to continue to support nested functions in the first
place? They are an abomination, a gcc-specific extension, and nobody
sane uses them (yeah, yeah, libobj, but I said _sane_).

Some ideas are just bad. Nested functions was one such idea. The
implementation used to do bad things (icache flushes at run-time,
for christ sake!).

Maybe you could support a specific subcase of nested functions where
they are always inlined, and basically do some slightly less nasty
tree-based inliner thing rather than any real nesting. And document
the horror as being a bad idea and only supported for legacy gcc
reasons?

Are there really any users that do not deserve to either be fixed
or just shot in the head?

                Linus



More information about the Gcc mailing list