2014-10-09 21:41 GMT+04:00 Jeff Law <l...@redhat.com>: > On 10/08/14 13:22, Ilya Enkovich wrote: >> >> Hi, >> >> This patch adds removal of redundant (covered by other) checks into >> checker optimization. >> >> Thanks, >> Ilya >> -- >> 2014-10-08 Ilya Enkovich <ilya.enkov...@intel.com> >> >> * tree-chkp.c (chkp_compare_checks): New. >> (chkp_remove_redundant_checks): New. >> (chkp_opt_execute): Run redundant checks removal >> algorithm. > > > Wouldn't pure removal be better modeled in existing optimizers? DOM would > seem to be a natural fit? > > Similarly, isn't the swapping very similar to a reverse DOM walk DSE-like > optimizer? > > Deferring further review until those questions are answered? > > jeff > >
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 pass. Thanks, Ilya