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: [ping][PATCH][1 of 2] Add value range info to SSA_NAME for zero sign extension elimination in RTL


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;


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