On Mon, Sep 24, 2007 at 09:36:25AM -0400, Diego Novillo wrote: > On 9/23/07, Gary Funck <[EMAIL PROTECTED]> wrote: > > > The operand, op: > > > > (gdb) p op > > $49 = 0x2aaaae1ebc60 > > (gdb) pt > > <var_decl 0x2aaaae1ebc60 D.3609 > > This symbol was not marked for renaming and the program is already in > SSA form. When your pass introduces new symbols, you need to add them > to the symbol table (with add_referenced_var) and also mark it for > renaming (with mark_sym_for_renaming). For examples see passes like > tree-sra.c or tree-pre.c that create new variables.
Diego, thanks. That particular symbol is being created in gimplify_expr, here (at line 541): 536 won't allocate any variable that is used in more than one basic 537 block, which means it will go into memory, causing much extra 538 work in reload and final and poorer code generation, outweighing 539 the extra memory allocation here. */ 540 if (!optimize || !is_formal || TREE_SIDE_EFFECTS (val)) 541 ret = create_tmp_from_val (val); 542 else 543 { 544 elt_t elt, *elt_p; 545 void **slot; Above, optimize=3, is_formal=0, and by deduction, side-effects must be true. 'val' above, is a constructor: (gdb) p debug_tree (val) <constructor 0x2aaaae0e9a80 type <record_type 0x2aaaadf6ea80 upc_shared_ptr_t type_0 DI size <integer_cst 0x2aaaadec5e70 constant invariant 64> unit size <integer_cst 0x2aaaadec5ea0 constant invariant 8> align 64 symtab 0 alias set 3 fields <field_decl 0x2aaaadf6eb40 phase type <integer_type 0x2aaaadf6ed80> unsigned external bit-field nonaddressable decl_4 SI file <built-in> line 0 size <integer_cst 0x2aaaadf7abd0 constant invariant 24> unit size <integer_cst 0x2aaaadec5ae0 constant invariant 3> align 1 offset_align 128 offset <integer_cst 0x2aaaadec5750 constant invariant 0> bit offset <integer_cst 0x2aaaadee0720 constant invariant 0> bit_field_type <integer_type 0x2aaaaded5600 unsigned int> context <record_type 0x2aaaadf6ea80 upc_shared_ptr_t> chain <field_decl 0x2aaaadf6ec00 thread>> chain <type_decl 0x2aaaadee4c30 D.1089>> constant> We use constructors to build a UPC shared pointer value (it has three parts [phase, thread, vaddr]). I would have thought gimplify_expr's internal mechanisms would mark veriables as referenced, when it needs to?