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: [tree-ssa] Generic NRV optimization [was Re: two-elementstruct performance (was: strict-aliasing and typedefs) ]

On Wed, 2004-02-25 at 08:47, Andreas Schwab wrote:
> writes:
> > Bootstrapped and regression tested on i686-pc-linux-gnu.
> >
> > 	* (OBJS-common): Add tree-nrv.o.
> > 	(tree-nrv.o): Add dependencies.
> > 	timevar.def (TV_TREE_NRV): New timevar.
> > 	* tree-nrv.c: New file implementing NRV on generic trees.
> > 	* tree-optimize.c (init_tree_optimization_passes): Link in
> > 	tree_nrv optimization pass.
> > 	* tree-pass.h (tree_nrv): Declare. 
> > 	* doc/invoke.texi: Add -fdump-tree-nrv documentation.
> This breakes bootstrap on ia64-linux.
> stage1/xgcc -Bstage1/ -B/usr/local/ia64-suse-linux/bin/ -c   -g -O2  -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wold-style-definition -Wno-variadic-macros -Werror -fno-common   -DHAVE_CONFIG_H    -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libbanshee/libcompat -I../../gcc/../libbanshee -I../../gcc/../libbanshee/points-to  ../../gcc/tree-ssa-ccp.c -o tree-ssa-ccp.o
> ../../gcc/tree-ssa-ccp.c: In function `get_default_value':
> ../../gcc/tree-ssa-ccp.c:2028: internal compiler error: in expand_expr_real_1, at expr.c:6652
ia64 was broken already, but this is the same ICE we are getting on

Jeff, we get confused in change_address_1 because we feed it a PARALLEL

#1  0x00000000005d0589 in change_address_1 (memref=0x2a9779fb30, mode=SImode,
    addr=0x2a97db3720, validate=1)
    at /home/cygnus/dnovillo/perf/sbox/tree-ssa-branch/local.x86_64/src/gcc/emit-rtl.c:1770
1770        abort ();
(gdb) list 1770
1765    change_address_1 (rtx memref, enum machine_mode mode, rtx addr, int validate)
1766    {
1767      rtx new;
1769      if (GET_CODE (memref) != MEM)
1770        abort ();
1771      if (mode == VOIDmode)
1772        mode = GET_MODE (memref);
1773      if (addr == 0)
1774        addr = XEXP (memref, 0);
(gdb) p memref
$1 = 0x2a9779fb30
(gdb) pr
(parallel:BLK [
        (expr_list (reg:SI 58 [ val ])
            (const_int 0 [0x0]))
        (expr_list (reg:DI 59 [ val+8 ])
            (const_int 8 [0x8]))

This happens while we try to expand the assignment:

#5  0x000000000061bd39 in expand_expr_real_1 (exp=0x2a98135f00, target=0x0,
    tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0)
    at /home/cygnus/dnovillo/perf/sbox/tree-ssa-branch/local.x86_64/src/gcc/expr.c:8967
8967            temp = expand_assignment (lhs, rhs, ! ignore);
(gdb) ptu exp
<retval>.lattice_val = val$lattice_val;

which is

(gdb) p exp
$4 = 0x2a98135f00
(gdb) pt
 <modify_expr 0x2a98135f00
    type <enumeral_type 0x2a97e8b8c0 latticevalue unsigned asm_written type_0 SI
        size <integer_cst 0x2a95623870 constant invariant 32>
        unit size <integer_cst 0x2a956238d0 constant invariant 4>
        align 32 symtab -1746598896 alias set -1 precision 32 min <integer_cst 0
x2a95612990 0> max <integer_cst 0x2a956129c0 4294967295>
        values <tree_list 0x2a97cbd0c0
            purpose <identifier_node 0x2a97e8a180 UNINITIALIZED symbol <const_de
cl 0x2a97e8b460 UNINITIALIZED>>
            value <integer_cst 0x2a97cbd060 constant invariant 0>
            chain <tree_list 0x2a97cbd120
                purpose <identifier_node 0x2a97e8a200 UNDEFINED symbol <const_decl 0x2a97e8b540 UNDEFINED>>
                value <integer_cst 0x2a97cbd090 constant invariant 1>
                chain <tree_list 0x2a97cbd180
                    purpose <identifier_node 0x2a97e8a280 CONSTANT symbol <const_decl 0x2a97e8b620 CONSTANT>>
                    value <integer_cst 0x2a97cbd0f0 constant invariant 2>
                    chain <tree_list 0x2a97cbd1e0
                        purpose <identifier_node 0x2a97e8a300 VARYING symbol <const_decl 0x2a97e8b700 VARYING>>
                        value <integer_cst 0x2a97cbd150 constant invariant 3>>>>> context <translation_unit_decl 0x2a95614380>>
    side-effects asm_written visited
    arg 0 <component_ref 0x2a98135eb0 type <enumeral_type 0x2a97e8b8c0 latticevalue>

        arg 0 <result_decl 0x2a97f67460 val type <record_type 0x2a97e8be00 value>
            used regdecl BLK file /home/cygnus/dnovillo/perf/sbox/tree-ssa-branch/local.x86_64/src/gcc/tree-ssa-ccp.c line 1987
            size <integer_cst 0x2a95623060 constant invariant 128>
            unit size <integer_cst 0x2a95623510 constant invariant 16>
            align 64 context <function_decl 0x2a97e91b60 get_default_value>
            (parallel:BLK [
        (expr_list (reg:SI 58 [ val ])
            (const_int 0 [0x0]))
        (expr_list (reg:DI 59 [ val+8 ])
            (const_int 8 [0x8]))
        arg 1 <field_decl 0x2a97e8b9a0 lattice_val type <enumeral_type 0x2a97e8b8c0 latticevalue>
            unsigned SI file /home/cygnus/dnovillo/perf/sbox/tree-ssa-branch/local.x86_64/src/gcc/tree-ssa-ccp.c line 78 size <integer_cst 0x2a95623870 32> unit size <integer_cst 0x2a956238d0 4>
            align 32 offset_align 128
            offset <integer_cst 0x2a95623690 constant invariant 0>
            bit offset <integer_cst 0x2a95623810 constant invariant 0> context <record_type 0x2a97e8bb60> arguments <integer_cst 0x2a95623690 0> chain <field_decl 0x2a97e8ba80 const_val>>>
    arg 1 <var_decl 0x2a97d0c460 val$lattice_val type <enumeral_type 0x2a97e8b8c0 latticevalue>
        unsigned used ignored SI file /home/cygnus/dnovillo/perf/sbox/tree-ssa-branch/local.x86_64/src/gcc/tree-ssa-ccp.c line 1987 size <integer_cst 0x2a95623870 32> unit size <integer_cst 0x2a956238d0 4>
        align 32 context <function_decl 0x2a97e91b60 get_default_value>
        (reg:SI 69 [ val$lattice_val ])>


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