public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Trevor Saunders <tbsaunde@tbsaunde.org>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>,
	Markus Trippelsdorf <markus@trippelsdorf.de>,
	Gerald Pfeifer <gerald@pfeifer.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] doc: discourage use of __attribute__((optimize())) in production code
Date: Mon, 14 Dec 2015 16:21:00 -0000	[thread overview]
Message-ID: <20151214161453.GA16122@tsaunders-iceball.corp.tor1.mozilla.com> (raw)
In-Reply-To: <CAFiYyc25Q7kMkjvbTfgBqUELyw4mop6ysT7aAJAz2NruV7sa2w@mail.gmail.com>

On Mon, Dec 14, 2015 at 10:01:27AM +0100, Richard Biener wrote:
> On Sun, Dec 13, 2015 at 9:03 PM, Andi Kleen <andi@firstfloor.org> wrote:
> > Markus Trippelsdorf <markus@trippelsdorf.de> writes:
> >
> >> Many developers are still using __attribute__((optimize())) in
> >> production code, although it quite broken.
> >
> > Wo reads documentation? @) If you want to discourage it better warn once
> > at runtime.
> 
> We're also quite heavily using it in LTO internally now.

besides that does this really make sense?  I suspect very few people are
using this for the fun of it.  I'd guess most usage is to disable
optimizations to work around bugs, or maybe trying to get a very hot
function optimized more.  Either way I suspect its only used by people
with good reason and this would just really iritate them.

Trev

> 
> Richard.
> 
> > -Andi

  reply	other threads:[~2015-12-14 16:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-13  8:19 Markus Trippelsdorf
2015-12-13 20:03 ` Andi Kleen
2015-12-14  9:01   ` Richard Biener
2015-12-14 16:21     ` Trevor Saunders [this message]
2015-12-14 16:41       ` Markus Trippelsdorf
2015-12-14 17:04         ` Manuel López-Ibáñez
2015-12-14 18:57         ` Trevor Saunders
2016-04-28 15:32 ` Jeff Law

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=20151214161453.GA16122@tsaunders-iceball.corp.tor1.mozilla.com \
    --to=tbsaunde@tbsaunde.org \
    --cc=andi@firstfloor.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gerald@pfeifer.com \
    --cc=markus@trippelsdorf.de \
    --cc=richard.guenther@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).