From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: David Edelsohn Cc: "Kaveh R. Ghazi" , egcs@cygnus.com Subject: Re: Stabilization status Date: Sun, 31 Jan 1999 23:58:00 -0000 Message-id: <2102.915313800@hurl.cygnus.com> References: <9901021937.AA26758@marc.watson.ibm.com> X-SW-Source: 1999-01n/msg00042.html In message < 9901021937.AA26758@marc.watson.ibm.com >you write: > Anyone can boot or use those flags if they want, but GCC should > not use those flag automatically. I'm not sure I totally agree. I believe there's still a fair number of AIX systems out there which aren't up-to-date enough to build egcs without special options. That's not good. It may make sense to enable -mminimal-toc during a bootstrap for those older AIX platforms. Either based on the canonical target name or an autoconf test of some kind. > concatenated. GCC can emit definitions for static variables multiple > times which bloats the TOC when static variables are used. ?!? Really? Wouldn't that cause an assembler error for multiple definitions? Or are they output as "local common" variables? > Another > problem is that static variables and constants each are allocated a > separate TOC entry instead of using pools with only a single entry for > each per module. It would probably be to our advantage to have multiple const pools. One for TOC entries, then another for all the compile-time constants. Then we could use a single TOC entry to reference all the compile-time constants for a single file. > Your old -fcombine-statics functionality is the type of thing that > is needed. Yea. The big problem is we need the GC work before we can safely bring back -fcombine-statics. The root of the problem is we have to defer output of statics until EOF. Initializers in particular are troublesome because they're often created on one of the short-lived obstacks. So we have to copy them to a more permanent obstack. Worse yet, we have to recursively copy things they point to that are not already on the permanent obstack. The copying itself is rather fragile and the memory explosions are signifiant. > The simplest way to describe it is that IBM's compiler behaves > like -mminimal-toc is enabled for constants and statics but not for global > variables. And it dynamically allocates the base registers, only > allocating them when necessary. I have not had time to pursue this. Interesting. jeff