public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Manuel López-Ibáñez" <lopezibanez@gmail.com>
To: Markus Trippelsdorf <markus@trippelsdorf.de>,
	Trevor Saunders <tbsaunde@tbsaunde.org>
Cc: Richard Biener <richard.guenther@gmail.com>,
	Andi Kleen <andi@firstfloor.org>,
	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 17:04:00 -0000	[thread overview]
Message-ID: <566EF674.70707@gmail.com> (raw)
In-Reply-To: <20151214164057.GD1409@x4>

On 14/12/15 16:40, Markus Trippelsdorf wrote:
> On 2015.12.14@11:20 -0500, Trevor Saunders wrote:
>> On Mon, Dec 14, 2015@10:01:27AM +0100, Richard Biener wrote:
>>> On Sun, Dec 13, 2015@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
>>>> @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.
>
> Well, if you look@bugzilla you'll find several wrong code bugs caused
> by this attribute, e.g.: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59262
>
> Also Richi stated in the past (I quote):
> »I consider the optimize attribute code seriously broken and
> unmaintained (but sometimes useful for debugging - and only that).«
>
> https://gcc.gnu.org/ml/gcc/2012-07/msg00201.html

It is even a FAQ: https://gcc.gnu.org/wiki/FAQ#optimize_attribute_broken

Cheers,

Manuel.


  reply	other threads:[~2015-12-14 17:04 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
2015-12-14 16:41       ` Markus Trippelsdorf
2015-12-14 17:04         ` Manuel López-Ibáñez [this message]
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=566EF674.70707@gmail.com \
    --to=lopezibanez@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gerald@pfeifer.com \
    --cc=markus@trippelsdorf.de \
    --cc=richard.guenther@gmail.com \
    --cc=tbsaunde@tbsaunde.org \
    /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).