This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] [Patch] PR67326 - relax trap assumption by looking at similar DRS
- From: Jakub Jelinek <jakub at redhat dot com>
- To: "Kumar, Venkataramanan" <Venkataramanan dot Kumar at amd dot com>
- Cc: "Richard Beiner (richard dot guenther at gmail dot com)" <richard dot guenther at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 20 Nov 2015 13:22:23 +0100
- Subject: Re: [RFC] [Patch] PR67326 - relax trap assumption by looking at similar DRS
- Authentication-results: sourceware.org; auth=none
- References: <CY1PR1201MB109888741196B084079723C78F1A0 at CY1PR1201MB1098 dot namprd12 dot prod dot outlook dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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