From: Alexander Monakov <amonakov@ispras.ru>
To: Fredrik Noring <noring@nocrew.org>
Cc: gcc-help@gcc.gnu.org, Stefan Franke <s.franke@bebbosoft.de>,
Segher Boessenkool <segher@kernel.crashing.org>
Subject: Re: m68k: Simple loop compiles into boundless recursion with -O2
Date: Thu, 14 Jan 2021 18:09:48 +0300 (MSK) [thread overview]
Message-ID: <alpine.LNX.2.20.13.2101141806200.23548@monopod.intra.ispras.ru> (raw)
In-Reply-To: <alpine.LNX.2.20.13.2101141803060.23548@monopod.intra.ispras.ru>
On Thu, 14 Jan 2021, Alexander Monakov via Gcc-help wrote:
> On Thu, 14 Jan 2021, Fredrik Noring wrote:
>
> > > __attribute__((optimize("no-tree-loop-distribute-patterns")))
> > > void *memset2(void *s, int c, unsigned int n)
> > > {
> > > ...
> >
> > This works, too, and I prefer it because the __attribute__ is attached
> > to the code itself.
>
> Just keep in mind that this attribute is currently not intended for use
> apart from debugging/testing:
>
> https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-optimize-function-attribute
>
> The optimize attribute should be used for debugging purposes only. It is not
> suitable in production code.
(part of the reason for that being that the interaction of the attribute with
options passed on the command line is poorly defined: currently adding the
attribute results in other -O and -f options dropped for the function, IIRC;
this should have gone out with the previous email, sorry about sending that
prematurely)
> Alexander
>
next prev parent reply other threads:[~2021-01-14 15:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-13 16:01 Fredrik Noring
2021-01-13 16:09 ` Alexander Monakov
2021-01-13 16:30 ` Fredrik Noring
2021-01-13 19:20 ` Segher Boessenkool
2021-01-13 19:53 ` Fredrik Noring
2021-01-13 21:46 ` Segher Boessenkool
2021-01-13 21:54 ` AW: " Stefan Franke
2021-01-14 14:54 ` Fredrik Noring
2021-01-14 15:05 ` Alexander Monakov
2021-01-14 15:09 ` Alexander Monakov [this message]
2021-01-14 15:15 ` AW: " Stefan Franke
2021-01-14 15:33 ` Alexander Monakov
2021-01-14 15:56 ` AW: " Stefan Franke
2021-01-15 2:23 ` Liu Hao
2021-01-15 6:23 ` Fredrik Noring
2021-01-13 16:23 ` AW: " Stefan Franke
2021-01-13 17:27 ` Fredrik Noring
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=alpine.LNX.2.20.13.2101141806200.23548@monopod.intra.ispras.ru \
--to=amonakov@ispras.ru \
--cc=gcc-help@gcc.gnu.org \
--cc=noring@nocrew.org \
--cc=s.franke@bebbosoft.de \
--cc=segher@kernel.crashing.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).