On Wed, Nov 26, 2014 at 03:41:46PM +0300, Ilya Enkovich wrote: > Hi, > > This patch makes optimization for bounds lifetime reduction to ignore > debug stetments. This fixes stage2 and stage3 comparision for > instrumented boostrap. OK for trunk?
Please add a small testcase (with -fcompare-debug -fcheck-pointer-bounds (or what other options you need to reproduce it) that fails without the patch and succeeds with it. > 2014-11-26 Ilya Enkovich <ilya.enkov...@intel.com> > > PR bootstrap/63995 > * tree-chkp-opt.c (chkp_reduce_bounds_lifetime): Ignore > debug statement when searching for a new position for > bounds load/creation statement. > > > diff --git a/gcc/tree-chkp-opt.c b/gcc/tree-chkp-opt.c > index ff390d7..92e0694 100644 > --- a/gcc/tree-chkp-opt.c > +++ b/gcc/tree-chkp-opt.c > @@ -1175,6 +1175,9 @@ chkp_reduce_bounds_lifetime (void) > > FOR_EACH_IMM_USE_STMT (use_stmt, use_iter, op) > { > + if (is_gimple_debug (use_stmt)) > + continue; > + > if (dom_bb && > dominated_by_p (CDI_DOMINATORS, > dom_bb, gimple_bb (use_stmt))) Jakub