From: Joe Perches <joe@perches.com>
To: Clement Courbet <courbet@google.com>
Cc: Nathan Chancellor <natechancellor@gmail.com>,
Kees Cook <keescook@chromium.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, linux-kernel@vger.kernel.org,
clang-built-linux@googlegroups.com
Subject: Re: [PATCH v2] x86: Alias memset to __builtin_memset.
Date: Tue, 24 Mar 2020 08:08:04 -0700 [thread overview]
Message-ID: <7a87a9b971caefa847c412608c98c0a2e1835904.camel@perches.com> (raw)
In-Reply-To: <20200324140742.71850-1-courbet@google.com>
On Tue, 2020-03-24 at 15:07 +0100, Clement Courbet wrote:
> Recent compilers know the meaning of builtins (`memset`,
> `memcpy`, ...) and can replace calls by inline code when
> deemed better. For example, `memset(p, 0, 4)` will be lowered
> to a four-byte zero store.
>
> When using -ffreestanding (this is the case e.g. building on
> clang), these optimizations are disabled. This means that **all**
> memsets, including those with small, constant sizes, will result
> in an actual call to memset.
[]
> In terms of code size, this grows the clang-built kernel a
> bit (+0.022%):
> 440285512 vmlinux.clang.after
> 440383608 vmlinux.clang.before
This shows the kernel getting smaller not larger.
Is this still reversed or is this correct?
next prev parent reply other threads:[~2020-03-24 15:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-23 11:42 [PATCH] " Clement Courbet
2020-03-23 15:47 ` Nathan Chancellor
2020-03-24 1:22 ` Nick Desaulniers
2020-03-24 1:26 ` Nick Desaulniers
2020-03-24 14:06 ` Clement Courbet
2020-03-24 17:29 ` Nick Desaulniers
2020-03-24 14:07 ` [PATCH v2] " Clement Courbet
2020-03-24 15:08 ` Joe Perches [this message]
2020-03-24 15:59 ` [PATCH v3] " Clement Courbet
2020-03-25 11:33 ` Bernd Petrovitsch
2020-03-24 16:02 ` [PATCH] " Clement Courbet
2020-03-25 7:59 ` Clement Courbet
2020-03-26 12:25 ` [PATCH v4] " Clement Courbet
2020-03-26 12:38 ` [PATCH] " Clement Courbet
2020-03-26 17:18 ` Nick Desaulniers
2020-03-27 4:06 ` Michael Ellerman
2020-03-27 17:12 ` Segher Boessenkool
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=7a87a9b971caefa847c412608c98c0a2e1835904.camel@perches.com \
--to=joe@perches.com \
--cc=bp@alien8.de \
--cc=clang-built-linux@googlegroups.com \
--cc=courbet@google.com \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®