> 
> Ok, so maybe a better question to symtab would be if there is an
> actual definition for what __builtin_FOO will call.  Not really
> whether that definition is cfun.  Of course all the fortify
> always-inline wrappers should not count as such (just in case
> the symtab code is confused about those).

Also GNU extern inlines that are often used to deal special cases.
> 
> So,
> 
> bool symbol_table::have_definition (enum built_in_fn);
> 
> ?  Not sure how to best implement that either.  asmname lookups are
> expensive ...

I am back from China trip, so i can handle you patch if you want.

I see that by stopping the optimization on whole translation unit that
defines memcpy/memset will solve the reachability issue I mentioned
in previous mail, but also when LTOing stuff like Linux kernel, it will
prevent the optimization on the whole program.
I am not quite sure how to deal with the alwaysinline wrappers however,
because there theoretically may contain memcpy/memset loops themselves.

Honza
> 
> Richard.

Reply via email to