On November 19, 2015 6:12:30 PM GMT+01:00, Bernd Schmidt <bschm...@redhat.com> 
wrote:
>On 11/19/2015 05:31 PM, Ilya Enkovich wrote:
>> Currently we fold all memcpy/memmove calls with a known data size.
>> It causes two problems when used with Pointer Bounds Checker.
>> The first problem is that we may copy pointers as integer data
>> and thus loose bounds.  The second problem is that if we inline
>> memcpy, we also have to inline bounds copy and this may result
>> in a huge amount of code and significant compilation time growth.
>> This patch disables folding for functions we want to instrument.
>>
>> Does it look reasonable for trunk and GCC5 branch?  Bootstrapped
>> and regtested on x86_64-unknown-linux-gnu.
>
>Can't see anything wrong with it. Ok.

But for small sizes this can have a huge impact on optimization.  Which is why 
we have the code in the first place.  I'd make the check less broad, for 
example inlining copies of size less than a pointer shouldn't be affected.

Richard.

>
>Bernd


Reply via email to