This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL
- From: Richard Biener <rguenther at suse dot de>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, Christophe Lyon <christophe dot lyon at linaro dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Kugan <kugan dot vivekanandarajah at linaro dot org>, Jakub Jelinek <jakub at redhat dot com>, Ramana Radhakrishnan <ramana dot radhakrishnan at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Tue, 24 Sep 2013 12:34:53 +0200 (CEST)
- Subject: Re: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL
- Authentication-results: sourceware.org; auth=none
- References: <CAFiYyc10HBW1PX+3jAQ=yJKfTjkP-9F2DnujNhU_ZBE0xG8_uQ at mail dot gmail dot com> <CAFiYyc0E=Zi5KYj=GHKsTsQWVpWSxyxo1N0kW5ZTyHbhjOzV4w at mail dot gmail dot com> <CAKdteOZ+D7zDS-=Bgnq4qsfKFziEOmn=92imJfN4VMLdQ-Jmeg at mail dot gmail dot com> <1874990 dot LctCbIxve3 at polaris> <CAFiYyc2F2gXp6Ey9bCKvSKMiRr1XNEA5EiK7J2iM4zgRxHfPFQ at mail dot gmail dot com>
On Tue, 24 Sep 2013, Richard Biener wrote:
> On Mon, Sep 23, 2013 at 10:34 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> >> I have committed it for you (rev 202831), with a few modifications
> >> (ChangeLog formatting, typos).
> >> Here is what I have committed:
> >>
> >> 2013-09-23 Kugan Vivekanandarajah <kuganv@linaro.org>
> >>
> >> * gimple-pretty-print.c (dump_ssaname_info): New function.
> >> (dump_gimple_phi): Call it.
> >> (pp_gimple_stmt_1): Likewise.
> >> * tree-core.h (tree_ssa_name): New union ssa_name_info_type field.
> >> (range_info_def): Declare.
> >> * tree-pretty-print.c (pp_double_int): New function.
> >> (dump_generic_node): Call it.
> >> * tree-pretty-print.h (pp_double_int): Declare.
> >> * tree-ssa-alias.c (dump_alias_info): Check pointer type.
> >> * tree-ssanames.h (range_info_def): New structure.
> >> (value_range_type): Move definition here.
> >> (set_range_info, value_range_type, duplicate_ssa_name_range_info):
> >> Declare.
> >> * tree-ssanames.c (make_ssa_name_fn): Check pointer type at
> >> initialization.
> >> (set_range_info): New function.
> >> (get_range_info): Likewise.
> >> (duplicate_ssa_name_range_info): Likewise.
> >> (duplicate_ssa_name_fn): Check pointer type and call
> >> duplicate_ssa_name_range_info.
> >> * tree-ssa-copy.c (fini_copy_prop): Likewise.
> >> * tree-vrp.c (value_range_type): Remove definition, now in
> >> tree-ssanames.h.
> >> (vrp_finalize): Call set_range_info to update value range of
> >> SSA_NAMEs.
> >> * tree.h (SSA_NAME_PTR_INFO): Macro changed to access via union.
> >> (SSA_NAME_RANGE_INFO): New macro.
> >
> > Nice patch, but the formatting is totally wrong wrt spaces, please reformat
> > using 2-space indentation and 8-space TABs, as already used in the files.
> >
> > The patch has also introduced 2 regressions in Ada:
> >
> > === acats tests ===
> > FAIL: c37211b
> > FAIL: c37211c
> >
> > === acats Summary ===
> > # of expected passes 2318
> > # of unexpected failures 2
> >
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > vrp_finalize () at /home/eric/svn/gcc/gcc/tree-vrp.c:9458
> > 9458 if (POINTER_TYPE_P (TREE_TYPE (name))
> > (gdb) bt
>
> I'm testing a trivial patch to fix that.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
Richard.
2013-09-24 Richard Biener <rguenther@suse.de>
* tree-vrp.c (vrp_finalize): Check for SSA name presence.
Index: gcc/tree-vrp.c
===================================================================
--- gcc/tree-vrp.c (revision 202860)
+++ gcc/tree-vrp.c (working copy)
@@ -9455,7 +9455,8 @@ vrp_finalize (void)
{
tree name = ssa_name (i);
- if (POINTER_TYPE_P (TREE_TYPE (name))
+ if (!name
+ || POINTER_TYPE_P (TREE_TYPE (name))
|| (vr_value[i]->type == VR_VARYING)
|| (vr_value[i]->type == VR_UNDEFINED))
continue;