2014-06-11 13:00 GMT+04:00 Marek Polacek <pola...@redhat.com>:
> On Wed, Jun 11, 2014 at 12:14:14PM +0400, Ilya Enkovich wrote:
>> This patch adds instrumented code support for strlen optimization.
>>
>> Bootstrapped and tested on linux-x86_64.
>>
>> Does it look OK?
>
> I haven't followed the Pointer Bounds Checker development, only looked at
> some of the patches, but I think that if all builtins similar to
> BUILT_IN_STRCPY would need changes like in the patch below, we're
> heading down a very bad road.  Adding with_bounds code to every second
> builtin in so many passes to properly handle its arguments will surely
> lead to unmaintainable mess over time.

I think talking about every second builtin and many passes is too
speculative. I do not see troubles with builtins other than string
functions which are handled mostly in strlen pass. And string
functions were always a special case. They are too important to have
them not optimized or not instrumented.

In cases of troubles over time instrumentation pass may be restricted
to instrument only some subset of builtin functions. It is also
possible to use different codes for instrumented builtins and thus
have only adjusted code to work with them.

Ilya

>
>         Marek

Reply via email to