From: Alexey Dobriyan <adobriyan@gmail.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org,
torvalds@linux-foundation.org
Subject: Re: [PATCH v-1] x86_64: new and improved memset() + question
Date: Mon, 11 Feb 2019 20:10:39 +0300 [thread overview]
Message-ID: <20190211171039.GA3574@avx2> (raw)
In-Reply-To: <20190211124716.GA13062@gmail.com>
On Mon, Feb 11, 2019 at 01:47:16PM +0100, Ingo Molnar wrote:
> * Alexey Dobriyan <adobriyan@gmail.com> wrote:
> > QUESTION: is it possible to tell gcc "this function is semantically
> > equivalent to memset(3) so make high level optimizations but call it
> > when it is necessary"? I suspect the answer is "no" :-\
>
> No idea ...
>
> > TODO:
> > CONFIG_FORTIFY_SOURCE is enabled by distros
> > benchmarks
> > testing
> > more comments
> > check with memset_io() so that no surprises pop up
>
> I'd only like to make happy noises here to make sure you continue with
> this work - it does look promising. :-)
Thanks, Ingo.
This is really the core of the problem: once memset() becomes something
other than
static inline void *memset(void *p, int c, size_t len)
{
return __builtin_memset(p, c, len);
}
GCC starts pretending that it doesn't know what memset() is and all those
advertised space savings go to hell.
prev parent reply other threads:[~2019-02-11 17:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 22:23 [PATCH v-1] x86_64: new and improved memset() + question Alexey Dobriyan
2019-02-11 12:47 ` Ingo Molnar
2019-02-11 17:10 ` Alexey Dobriyan [this message]
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=20190211171039.GA3574@avx2 \
--to=adobriyan@gmail.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--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