lkml.org 
[lkml]   [2019]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v-1] x86_64: new and improved memset() + question
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.

\
 
 \ /
  Last update: 2019-02-11 18:11    [W:0.044 / U:2.124 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site