This is the mail archive of the gcc@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: Status of Ada in GCC?


> I'm not talking about shared generics.  I'm talking about not
> generating (and emitting) code for subprograms formally part of
> generic instantiations which are never referenced (and known to be
> unreferenced at compile time).

gnatelim removes such unused subprograms

> Not only would this reduce executable size considerably (I think you
> can already use pragma Eliminate for that), compile time would benefit
> a lot as well.  During my first Ada experiments, the required compile
> time was so *huge* that I avoided the package completely.  (Have you
> ever asked your customers if they use more than one instantiation of
> this generic per compilation unit?)

We are not aware of any customers using this package, none of the sample
code we have from customers uses it, and no customer has ever mentioned
using it, or had any concerns about it.

It sounds like you had a large number of instantiations of this package,
and that indeed will generate piles of code. The proper approach in this
case is to make these instantiations separate units, and then with the
units as required, rather than put a whole lot of them in one package.


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