public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Meissner, Michael" <michael.meissner@amd.com>
To: "Sylvain Pion" <Sylvain.Pion@sophia.inria.fr>,
	<gcc-patches@gcc.gnu.org>,         <karthikkumar@gmail.com>,
	        "Harle, Christophe" <christophe.harle@amd.com>
Subject: RE: PATCH [function-specific, committed] Add #pragma support, make 	cold functions compile with -Os
Date: Wed, 18 Jun 2008 16:24:00 -0000	[thread overview]
Message-ID: <6096959DEF5C9447A6BF80BDC7EB9EDC0615682C@SBOSEXMB1.amd.com> (raw)
In-Reply-To: <4858E5EF.2040001@sophia.inria.fr>

> -----Original Message-----
> From: Sylvain Pion [mailto:Sylvain.Pion@sophia.inria.fr]
> Sent: Wednesday, June 18, 2008 6:40 AM
> To: Meissner, Michael; gcc-patches@gcc.gnu.org; karthikkumar@gmail.com;
> Harle, Christophe
> Subject: Re: PATCH [function-specific, committed] Add #pragma support,
> make cold functions compile with -Os
> 
> Michael Meissner a écrit :
> > This patch also allows a function to be compiled with different
> optimization
> > options than the standard in addition to different target options.
> Right now,
> > the only use is to compile cold functions with -Os.  I am stilling
> mulling over
> > how much of the optimization interface to allow users to use via
> attribute or
> > #pragma.  I would be interested in hearing from potential users whether
> you
> > really need to set say -ftree-vectorize in a function, or just having
> > -O1/-O2/-O3/-Os is sufficient, and have the -f options inherited from
> the
> > command line.
> 
> As I mentioned previously, I'm still interested in -frounding-math, on a
> per-function level.  A bonus if this does not stop inlining, of course,
> but this is not a strong requirement for me (this is related to the
> FENV_ACCESS
> pragma).  This is useful for implementing interval arithmetic efficiently
> as a C++ library, like the one which is proposed for TR2, and not forcing
> its users to add -frounding-math on the command line.
> 
> Is something like this on your todo-list?

My original message may have bounced, due to some internal firewall issues.

I think you and Andi make points that it is useful to widen the scope beyond just -On.  At the internal level, it is fairly simple to add, since the current interface just copies all of the optimization switches in one step, and we just have to add some parsing to add the syntax.

I did get feedback that if you allow arbitrarily switching things around you can confuse the optimizers.

I also agree that ultimately it would be nice to allow this at the statement level, rather than just the function level, but that will need some more thought and is a 4.5 feature and not 4.4. 

--
Michael Meissner
AMD, MS 83-29
90 Central Street
Boxborough, MA 01719

  reply	other threads:[~2008-06-18 16:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-18  0:19 Michael Meissner
2008-06-18  6:02 ` Ralf Wildenhues
2008-06-18 16:22   ` PATCH [function-specific, committed] Add #pragma support, makecold " Meissner, Michael
2008-06-18 10:43 ` PATCH [function-specific, committed] Add #pragma support, make cold " Sylvain Pion
2008-06-18 16:24   ` Meissner, Michael [this message]
2008-06-18 11:33 ` Andi Kleen
2008-06-18 14:35   ` Michael Meissner
2008-06-18 17:19   ` Meissner, Michael
2008-06-19  0:26 ` Mark Mitchell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6096959DEF5C9447A6BF80BDC7EB9EDC0615682C@SBOSEXMB1.amd.com \
    --to=michael.meissner@amd.com \
    --cc=Sylvain.Pion@sophia.inria.fr \
    --cc=christophe.harle@amd.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=karthikkumar@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).