This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, Pointer Bounds Checker 14/x] Passes [15/n] Optimize redundant checks
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 13 Oct 2014 18:58:03 +0400
- Subject: Re: [PATCH, Pointer Bounds Checker 14/x] Passes [15/n] Optimize redundant checks
- Authentication-results: sourceware.org; auth=none
- References: <20141008192227 dot GO13454 at msticlxl57 dot ims dot intel dot com> <5436C8DE dot 5020108 at redhat dot com> <CAMbmDYb0Cy0c_osyKRVp==0dQh1ni_CuGrQ6_5jcRVhXs4LK4A at mail dot gmail dot com> <54380FC7 dot 2090304 at redhat dot com>
2014-10-10 20:56 GMT+04:00 Jeff Law <email@example.com>:
> On 10/10/14 09:50, Ilya Enkovich wrote:
>> Checks and and intersection removal code was added as a simple pass
>> catching trivial cases. I'm sure there are optimizations having
>> common elements with what checker optimizer does. But initially we
>> didn't want to adopt existing optimizers because GIMPLE representation
>> of instrumentation was not stable and also we still don't know what
>> are important targets for optimizations.
>> The plan is to have stable version first. After enabling we want to
>> make performance analysis and determine which optimizations are most
>> required (it may appear checks removal doesn't give any significant
>> performance gain at all), determine which of current infrastructure
>> may be re-used (if any) and implement proper checker optimization.
>> Current optimizer is a simple code cleanup. I do not think we should
>> make any significant rework of it as a part of enabling. If current
>> approach seems to require significant changes to go to trunk then it
>> should be probably delayed and go separately from instrumentation
> Well, I think it should be trivial to handle the redundant check elimination
> in DOM.
> Most likely eliminate_redundant_computations needs some work to allow it to
> look inside those checks and get them recorded into its tables. With that
> in place, DOM should optimize this stuff without further intervention. It's
> probably less code than you've already written :-)
> The swapping variant feels like it should be simple to implement with the
> existing dominator walkers. But I haven't thought nearly as much about that
I'll look into DOM and a possibility to use it for checks removal.
But I give higher priority to builtins instrumentation and therefore
prefer to delay this one and return to it after builtins
instrumentation work or in case there is some spare time for it. This
patch is not critical for checker functionality and may be excluded
from initial commit.