public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: Richard Biener <rguenther@suse.de>, Michael Matz <matz@suse.de>,
	       Borislav Petkov <bp@alien8.de>,
	gcc@gcc.gnu.org,        Nadav Amit <namit@vmware.com>,
	Ingo Molnar <mingo@redhat.com>,
	       linux-kernel@vger.kernel.org, x86@kernel.org,
	       Masahiro Yamada <yamada.masahiro@socionext.com>,
	       Sam Ravnborg <sam@ravnborg.org>,
	Alok Kataria <akataria@vmware.com>,
	       Christopher Li <sparse@chrisli.org>,
	       Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	       "H. Peter Anvin" <hpa@zytor.com>,
	Jan Beulich <JBeulich@suse.com>,
	       Josh Poimboeuf <jpoimboe@redhat.com>,
	Juergen Gross <jgross@suse.com>,
	       Kate Stewart <kstewart@linuxfoundation.org>,
	       Kees Cook <keescook@chromium.org>,
	linux-sparse@vger.kernel.org,
	       Peter Zijlstra <peterz@infradead.org>,
	       Philippe Ombredanne <pombredanne@nexb.com>,
	       Thomas Gleixner <tglx@linutronix.de>,
	       virtualization@lists.linux-foundation.org,
	       Linus Torvalds <torvalds@linux-foundation.org>,
	       Chris Zankel <chris@zankel.net>,
	Max Filippov <jcmvbkbc@gmail.com>,
	       linux-xtensa@linux-xtensa.org,
	       Andrew Morton <akpm@linux-foundation.org>
Subject: Re: PROPOSAL: Extend inline asm syntax with size spec
Date: Wed, 10 Oct 2018 08:03:00 -0000	[thread overview]
Message-ID: <20181010080324.GV29268@gate.crashing.org> (raw)
In-Reply-To: <20181010072240.GB103159@gmail.com>

On Wed, Oct 10, 2018 at 09:22:40AM +0200, Ingo Molnar wrote:
> * Richard Biener <rguenther@suse.de> wrote:
> > Can kernel folks give this a second and third thought please so we
> > don't implement sth that in the end won't satisfy you guys?
> 
> So this basically passes '0 size' to the inliner, which should be better
> than passing in the explicit size, as we'd inevitably get it wrong
> in cases.

The code immediately after this makes it size 1, even for things like
asm(""), I suppose this works better for the inliner.  But that's a detail
(and it might change); the description says "consider this asm as minimum
length and cost for inlining decisions", which works for either 0 or 1.

> I also like 'size 0' for the reason that we tend to write assembly code
> and mark it 'inline' if we really think it matters to performance,
> so making it more likely to be inlined when used within another inline
> function is a plus as well.

You can think of it as meaning "we want this asm inlined always", and then
whether that actually happens depends on if the function around it is
inlined or not.


Segher

  parent reply	other threads:[~2018-10-10  8:03 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20181003213100.189959-1-namit@vmware.com>
2018-10-07  9:46 ` Borislav Petkov
2018-10-07 13:23   ` Segher Boessenkool
2018-10-07 14:14     ` Borislav Petkov
2018-10-07 15:14       ` Segher Boessenkool
     [not found]         ` <20181008055838.GA66819@gmail.com>
2018-10-08  7:53           ` Segher Boessenkool
2018-10-07 15:53     ` Michael Matz
2018-10-08  7:31       ` Segher Boessenkool
2018-10-08  9:09         ` Richard Biener
2018-10-08 10:03           ` Segher Boessenkool
2018-10-09 15:54           ` Segher Boessenkool
2018-10-10  7:12             ` Richard Biener
2018-10-10  7:54               ` Segher Boessenkool
     [not found]               ` <20181010072240.GB103159@gmail.com>
2018-10-10  8:03                 ` Segher Boessenkool [this message]
2018-10-10  8:19                   ` Borislav Petkov
2018-10-10  8:36                     ` Richard Biener
2018-10-10 18:55                     ` Segher Boessenkool
2018-10-10 19:14                       ` Borislav Petkov
2018-10-13 19:33                         ` Borislav Petkov
     [not found]                           ` <alpine.LNX.2.20.13.1810132355180.13914@monopod.intra.ispras.ru>
2018-10-13 21:31                             ` Borislav Petkov
2018-10-25 10:23                           ` Borislav Petkov
     [not found]                           ` <20181031125526.GA13219@hirez.programming.kicks-ass.net>
2018-10-31 22:04                             ` Segher Boessenkool
2018-11-01  5:23                             ` Joe Perches
     [not found]                               ` <20181101090114.GE3159@hirez.programming.kicks-ass.net>
2018-11-01  9:20                                 ` Joe Perches
2018-10-10 10:29                   ` Richard Biener
2018-10-10 16:31             ` Nadav Amit
2018-10-10 19:31               ` Segher Boessenkool
2018-10-11  7:05               ` Richard Biener
     [not found]             ` <CAK7LNARmrdtyE7JRAdJH_zbfvD_cej+TGLh+5KfT20o538KUcA@mail.gmail.com>
2018-11-29 13:09               ` Borislav Petkov via gcc
2018-11-29 13:16                 ` Richard Biener
2018-11-29 13:25                   ` Borislav Petkov via gcc
2018-11-29 13:52                     ` Richard Biener
2018-11-30  9:06               ` Segher Boessenkool
2018-11-30 10:04                 ` Boris Petkov via gcc
2018-12-02  6:03                   ` Segher Boessenkool
     [not found]       ` <20181008061323.GB66819@gmail.com>
2018-10-08  8:19         ` Segher Boessenkool
     [not found]   ` <4F2F1BCE-7875-4160-9E1E-9F8EF962D989@vmware.com>
2018-10-07 16:13     ` [RESEND] " Nadav Amit
2018-10-07 16:46     ` Richard Biener
2018-10-07 19:06       ` Nadav Amit
2018-10-07 19:52         ` Jeff Law
2018-10-08  7:46         ` Richard Biener

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=20181010080324.GV29268@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=JBeulich@suse.com \
    --cc=akataria@vmware.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=chris@zankel.net \
    --cc=gcc@gcc.gnu.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=jgross@suse.com \
    --cc=jpoimboe@redhat.com \
    --cc=keescook@chromium.org \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=matz@suse.de \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=namit@vmware.com \
    --cc=peterz@infradead.org \
    --cc=pombredanne@nexb.com \
    --cc=rguenther@suse.de \
    --cc=sam@ravnborg.org \
    --cc=sparse@chrisli.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=x86@kernel.org \
    --cc=yamada.masahiro@socionext.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).