On 30 May 10:45, Jeff Law wrote:
> On 05/29/14 04:53, Ilya Enkovich wrote:
> >Hi,
> >
> >This patch tries to keep bounds initial values when it may be needed.  Even 
> >if initial value is not fully known (e.g. we know only low bound) it still 
> >may help to remove some redundant checks.
> >
> >Bootstrapped and tested on linux-x86_64.
> >
> >Thanks,
> >Ilya
> >--
> >gcc/
> >
> >2013-05-29  Ilya Enkovich  <ilya.enkov...@intel.com>
> >
> >     * ipa.c (symtab_remove_unreachable_nodes): Kepp initial values for
> >     pointer bounds to be used for checks eliminations.
> >     * lto-cgraph.c (compute_ltrans_boundary): Likewise.
> >     * add_references_to_partition (add_references_to_partition): Add
> >     references to pointer bounds vars.
> Typo in the ChangeLog "kepp" -> "keep".
> 
> OK for the trunk when the rest of the stuff is approved, though I'm
> curious how, for example, keeping the initial value for an
> unreachable node in symtab_remove_unreachable_nodes helps eliminate
> redundant checks.
Consider we have some var 'arr' and static bounds '__chkp_bounds_of_arr' 
holding its bounds. Upper bound may be unknown at compile time and therefore 
'__chkp_bounds_of_arr' is not a candidate for constant folding. But we always 
know low bound which is '&arr'. It means we may remove checks of low bound when 
value of '__chkp_bounds_of_arr' is used in checks. That is why I want to keep 
initials for all static bounds vars.

Here is fixed ChangeLog.

Thanks,
Ilya
--
gcc/

2014-06-02  Ilya Enkovich  <ilya.enkov...@intel.com>

        * ipa.c (symtab_remove_unreachable_nodes): Keep initial values for
        pointer bounds to be used for checks eliminations.
        * lto-cgraph.c (compute_ltrans_boundary): Likewise.
        * add_references_to_partition (add_references_to_partition): Add
        references to pointer bounds vars.


> 
> Jeff
> 

Reply via email to