optimization removes a __builtin_memcpy?
Steve Kargl
sgk@troutmask.apl.washington.edu
Mon Dec 1 14:45:00 GMT 2008
On Sun, Nov 30, 2008 at 07:56:51PM +0100, Paul Richard Thomas wrote:
> Dear Richard,
>
> >> The diff shows that the fails case correctly has dlen=30
> >> and in fact for any value less than slen=44 and -O[123]
> >> removes the __builtin_memcpy(). So what is missing or
> >> how to I inhibit this optimization?
> >
> > You cannot inhibit this optimization, instead the optimization should be
> > fixed to not generate invalid gimple ;) (see builtins.c:fold_builtin_memory_op)
> >
>
> Your comment is a bit opaque, to me at least:-) I looked at
> builtins.c:fold_builtin_memory_op and figured out that if dest or src
> are not pointer types the call does not get inlined. Does this
> matter?
>
> Steve, does the code work?
>
I have a working patch. Unfortunately, I had to move my trip
to Washington DC up by a day, so was sitting on an airplane
for 5 hours yesterday. I'll submit a patch sometime this
week.
Richard's comment helped to the extent that I read through
trans.c with a bit more care. In the end, telling someone
with my background to look at builtins.c:fold_builtin_memory_op
is tantamount to telling a blind person to look at a Picasso.
--
Steve
More information about the Fortran
mailing list