This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Target-specific pragmas
- To: Geert Bosch <bosch at gnat dot com>, Stan Shebs <shebs at apple dot com>
- Subject: Re: Target-specific pragmas
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Thu, 21 Jun 2001 15:32:04 -0700
- cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
--On Thursday, June 21, 2001 11:27:57 AM -0400 Geert Bosch <bosch@gnat.com>
wrote:
> On Wed, 20 Jun 2001, Stan Shebs wrote:
> 2. Some of our pragmas exist to provide per-function control over
> optimization levels and flag_writable_strings. I vaguely remember
> some discussion over whether there ought to be some kind of fine
> grained control over flags via pragmas and/or attributes. Is there
> a consensus on what to do here?
I really don't want to see us try to do this. It is complex, and the
semantics
are highly non-obvious. What if you inline a writable-string function into
one that
isn't? What if you inline a function optimized for speed into one optimized
for space? Can you specify all options or only just some in th #pragmas?
If only
some, how do you decide which ones? What it additional ones make sense for
some
targets? But if you specify all, how do you avoid ones that are mutually
incompatible?
Does it make sense to have different ABIs for functions in the same module?
If so,
how does GCC know how to make calls between them?
In general, as we do more cross-procedure and cross-module optimizations
in the future, all these questions will get even more complex.
I think that the per-function optimization-level idea could be useful in
the future,
but we need to focus on quality, not quantity, of features right now. I
don't see these
features as having widespread benefit in GNU-land.
BTW, is Apple actually documenting all these changes for its users? If
not, I suggest
that you do not. If you have, I would mark it as deprecated. Otherwise,
we're going to
have to have the "Apple has this and we have millions of users so we cannot
change
this but we don't want to fork" vs. "Ugh! We're not sure what that means
and we're not
sure we want it" argument seems like it's going to come up a lot. :-(
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com