This is the mail archive of the 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 24/09/13 19:23, Richard Biener wrote:
On Mon, Sep 23, 2013 at 10:34 PM, Eric Botcazou <> 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  <>

     * 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):
     * tree-ssanames.c (make_ssa_name_fn): Check pointer type at
     (set_range_info): New function.
     (get_range_info): Likewise.
     (duplicate_ssa_name_range_info): Likewise.
     (duplicate_ssa_name_fn): Check pointer type and call
     * tree-ssa-copy.c (fini_copy_prop): Likewise.
     * tree-vrp.c (value_range_type): Remove definition, now in
     (vrp_finalize): Call set_range_info to update value range of
     * 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.

I am looking at everything and will send a patch to fix that.

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

I am sorry I missed this as I didnt test ada. I wrongly assumed that all the frontends are enabled by dafault.

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.

I think the return value of ssa_name () (i.e. name) can be NULL and it has to be checked for NULL. In tree-vrp.c it is not checked in some other places related to debugging. In other places (eg. in tree-ssa-pre.c) there are checks .

Thanks for looking into it and I will wait for your fix.



#0  vrp_finalize () at /home/eric/svn/gcc/gcc/tree-vrp.c:9458
#1  execute_vrp () at /home/eric/svn/gcc/gcc/tree-vrp.c:9583
#2  (anonymous namespace)::pass_vrp::execute (this=<optimized out>)
     at /home/eric/svn/gcc/gcc/tree-vrp.c:9673
#3  0x0000000000c52c9a in execute_one_pass (pass=pass@entry=0x22e2210)
     at /home/eric/svn/gcc/gcc/passes.c:2201
#4  0x0000000000c52e76 in execute_pass_list (pass=0x22e2210)
     at /home/eric/svn/gcc/gcc/passes.c:2253
#5  0x0000000000c52e88 in execute_pass_list (pass=0x22e04d0)
     at /home/eric/svn/gcc/gcc/passes.c:2254
#6  0x00000000009b9c49 in expand_function (node=0x7ffff6d12e40)
     at /home/eric/svn/gcc/gcc/cgraphunit.c:1750
#7  0x00000000009bbc17 in expand_all_functions ()
     at /home/eric/svn/gcc/gcc/cgraphunit.c:1855
#8  compile () at /home/eric/svn/gcc/gcc/cgraphunit.c:2192
#9  0x00000000009bc1fa in finalize_compilation_unit ()
     at /home/eric/svn/gcc/gcc/cgraphunit.c:2269
#10 0x00000000006681b5 in gnat_write_global_declarations ()
     at /home/eric/svn/gcc/gcc/ada/gcc-interface/utils.c:5630
#11 0x0000000000d4577d in compile_file ()
     at /home/eric/svn/gcc/gcc/toplev.c:560
#12 0x0000000000d4750a in do_compile () at
#13 toplev_main (argc=14, argv=0x7fffffffdca8)
     at /home/eric/svn/gcc/gcc/toplev.c:1967
#14 0x00007ffff6f2a23d in __libc_start_main () from /lib64/
#15 0x0000000000635381 in _start () at ../sysdeps/x86_64/elf/start.S:113
(gdb) p name
$1 = (tree) 0x0

Eric Botcazou

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