This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] [Patch] PR67326 - relax trap assumption by looking at similar DRS


On Fri, Nov 20, 2015 at 12:02:07PM +0000, Kumar, Venkataramanan wrote:
> Also. 
> (1) I guard these checks for  -ftree-loop-if-convert-stores and -fno-common. 
> Sometimes vectorization flags also triggers if conversion.
> (2) Also hashing base DRs for writes only. 

Let me comment just on formatting, will leave actual review to Richard.
> 
> gcc/ChangeLog
> 2015-11-19  Venkataramanan  <Venkataramanan.Kumar@amd.com>

Surname missing.
> 	
> 	PR tree-optimization/67326
> 	* tree-if-conv.c  (offset_DR_map): Define.

Extraneous space.

>     	(struct ifc_dr): Add new tree base_predicate field.

All ChangeLog lines should be indented by a single tab.

>     	(hash_memrefs_baserefs_and_store_DRs_read_written_info): Hash offsets, DR pairs

Too long line.

> 	and hash base ref,  DR pairs  for write type DRs.

Extraneous spaces.

> 	(ifcvt_memrefs_wont_trap):  Guard checks with -ftree-loop-if-convert-stores flag. 

Too long line and extraneous spaces.

>        Check for similar DR that are accessed unconditionally.
>        (if_convertible_loop_p_1):  Initialize and delete offset hash maps

Extraneous space, missing full stop at the end.
> 
> gcc/testsuite/ChangeLog
> 2015-11-19  Venkataramanan  <Venkataramanan.Kumar@amd.com>
> 	* gcc.dg/tree-ssa/ifc-pr67326.c:  Add new.

Extraneous space.

> +  if (DR_IS_WRITE (a))
>      {
> -      IFC_DR (a)->predicate = ca;
> -      *base_master_dr = a;
> +      base_master_dr = &baseref_DR_map->get_or_insert (base_ref,&exist2);

Missing space before &exist2);

> +      offset_master_dr = &offset_DR_map->get_or_insert (offset,&exist3);
> +      if (!exist3)
> +	*offset_master_dr = a;
> +
> +      if (DR_RW_UNCONDITIONALLY (*offset_master_dr) != 1)
> +	DR_RW_UNCONDITIONALLY (*offset_master_dr)
> +		= DR_RW_UNCONDITIONALLY (*master_dr);

Wrong indentation, the = should be below the first underscore in
DR_RW_UNCONDITIONALLY.

> -      if (DR_WRITTEN_AT_LEAST_ONCE (*base_master_dr) == 1)
> +      if ((base_master_dr
> +	   && DR_WRITTEN_AT_LEAST_ONCE (*base_master_dr) == 1))

Extraneous () pair.

> +  else if (DR_OFFSET (a))
> +    {
> +      offset_dr = offset_DR_map->get (DR_OFFSET (a));
> +      if ((DR_RW_UNCONDITIONALLY (*offset_dr) == 1)

Likewise.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]