public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Richard Earnshaw <Richard.Earnshaw@foss.arm.com>,
	 GCC Development <gcc@gcc.gnu.org>
Subject: Re: [RFC] Adding a new attribute to function param to mark it as constant
Date: Wed, 04 Aug 2021 19:08:08 +0200	[thread overview]
Message-ID: <8735rp6suf.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20210804161645.GI1583@gate.crashing.org> (Segher Boessenkool's message of "Wed, 4 Aug 2021 11:16:45 -0500")

* Segher Boessenkool:

> On Wed, Aug 04, 2021 at 03:27:00PM +0100, Richard Earnshaw wrote:
>> On 04/08/2021 14:40, Segher Boessenkool wrote:
>> >On Wed, Aug 04, 2021 at 02:00:42PM +0100, Richard Earnshaw wrote:
>> >>We don't want to have to resort to macros.  Not least because at some
>> >>point we want to replace the content of arm_neon.h with a single #pragma
>> >>directive to remove all the parsing of the header that's needed.  What's
>> >>more, if we had a suitable pragma we'd stand a fighting chance of being
>> >>able to extend support to other languages as well that don't use the
>> >>pre-processor, such as Fortran or Ada (not that that is on the cards
>> >>right now).
>> >
>> >So how do you want to handle constants-that-are-not-yet-constant, say
>> >before inlining?  And how do you want to deal with those possibly not
>> >ever becoming constant, perhaps because you used a too low "n" in -On
>> >(but there are very many random other causes)?  And, what *is* a
>> >constant, anyway?  This is even more fuzzy if you consider those
>> >other languages as well.
>> >
>> >(Does skipping parsing of some trivial header save so much time?  Huh!)
>> 
>> Trivial?  arm_neon.h is currently 20k lines of source.  What's more, it 
>> has to support inline functions that might not be available when the 
>> header is parsed, but might become available if the user subsequently 
>> compiles a function with different attributes enabled.  It is very 
>> definitely *NOT* trivial.
>
> Ha yes :-)  I just assumed without looking that it would be like other
> architectures' intrinsics headers.  Whoops.

But isn't it?

$ echo '#include <x86intrin.h>' | gcc -E - | wc -l
41045

Thanks,
Florian


  reply	other threads:[~2021-08-04 17:08 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23 10:53 Prathamesh Kulkarni
2021-07-23 17:59 ` Andrew Pinski
2021-07-26  9:04   ` Prathamesh Kulkarni
2021-07-27  8:19     ` Richard Biener
2021-08-03 10:11       ` Prathamesh Kulkarni
2021-08-03 10:13         ` Prathamesh Kulkarni
2021-08-03 17:44         ` Martin Sebor
2021-08-04  9:46           ` Richard Earnshaw
2021-08-06  0:06             ` Martin Sebor
2021-08-06 10:51               ` Richard Earnshaw
2021-08-06 20:39                 ` Martin Sebor
2021-08-12  8:32                   ` Prathamesh Kulkarni
2021-08-13 17:14                     ` Martin Sebor
2021-08-18  6:52                       ` Prathamesh Kulkarni
2021-08-18 14:40                         ` Martin Sebor
2021-08-19  8:10                           ` Prathamesh Kulkarni
2021-08-03 21:55 ` Segher Boessenkool
2021-08-04  9:50   ` Prathamesh Kulkarni
2021-08-04 10:17     ` Segher Boessenkool
2021-08-04 11:50       ` Prathamesh Kulkarni
2021-08-04 12:46         ` Segher Boessenkool
2021-08-04 13:00           ` Richard Earnshaw
2021-08-04 13:40             ` Segher Boessenkool
2021-08-04 14:27               ` Richard Earnshaw
2021-08-04 16:16                 ` Segher Boessenkool
2021-08-04 17:08                   ` Florian Weimer [this message]
2021-08-04 17:59                     ` Segher Boessenkool
2021-08-05  9:32                       ` Richard Earnshaw
2021-08-05  9:01             ` Prathamesh Kulkarni
2021-08-05 15:06               ` Segher Boessenkool
2021-08-06 20:10 Martin Uecker

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=8735rp6suf.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=Richard.Earnshaw@foss.arm.com \
    --cc=gcc@gcc.gnu.org \
    --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).