------- Comment #8 from ebotcazou at gcc dot gnu dot org  2007-07-13 15:12 
-------
> visit_phi is called on a PHI node with 1 argument (shrinked by DOM):

I presume this degenerated PHI is not eliminated because it is abnormal:

(gdb) p debug_tree(phi)
 <phi_node 0x5577f700 asm_written>

(gdb) p debug_tree(def)
 <ssa_name 0x557f04e0
    type <record_type 0x5577672c string___XUB readonly DI
        size <integer_cst 0x55709738 constant invariant 64>
        unit size <integer_cst 0x55709754 constant invariant 8>
        align 32 symtab 0 alias set 45 canonical type 0x5577672c
        fields <field_decl 0x5576a5a0 LB0 type <integer_type 0x557162f4
integer>
            nonaddressable SI file gcc/ada/rts/a-except.ads line 306
            size <integer_cst 0x5570963c constant invariant 32>
            unit size <integer_cst 0x55709428 constant invariant 4>
            align 32 offset_align 128
            offset <integer_cst 0x55709968 constant invariant 0>
            bit offset <integer_cst 0x55709984 constant invariant 0> context
<record_type 0x5577672c string___XUB> chain <field_decl 0x5576a600 UB0>> Ada
size <integer_cst 0x55709738 64>
        pointer_to_this <pointer_type 0x55776798> chain <type_decl 0x55776b64
D.690>>
    asm_written visited var <name_memory_tag 0x557de958 NMT.152> def_stmt
<call_expr 0x5571439c>
    version 264 in-abnormal-phi>

/* Propagate RHS into all uses of LHS (when possible).

   RHS and LHS are derived from STMT, which is passed in solely so
   that we can remove it if propagation is successful.

   When propagating into a PHI node or into a statement which turns
   into a trivial copy or constant initialization, set the
   appropriate bit in INTERESTING_NAMEs so that we will visit those
   nodes as well in an effort to pick up secondary optimization
   opportunities.  */

static void 
propagate_rhs_into_lhs (tree stmt, tree lhs, tree rhs, bitmap
interesting_names)
{
  /* First verify that propagation is valid and isn't going to move a
     loop variant variable outside its loop.  */
  if (! SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs)
      && (TREE_CODE (rhs) != SSA_NAME
          || ! SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs))


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32705

Reply via email to