------- Comment #15 from dberlin at gcc dot gnu dot org  2007-08-22 20:10 
-------
(In reply to comment #14)
> --- ipa-type-escape.c.jj13      2007-08-13 15:11:18.000000000 +0200
> +++ ipa-type-escape.c   2007-08-22 19:21:07.000000000 +0200
> @@ -1704,6 +1704,21 @@ analyze_function (struct cgraph_node *fn
>      FOR_EACH_BB_FN (this_block, this_cfun)
>        {
>         block_stmt_iterator bsi;
> +       tree phi, op;
> +       use_operand_p use;
> +       ssa_op_iter iter;
> +
> +       /* Find the addresses taken in phi node arguments.  */
> +       for (phi = phi_nodes (this_block); phi; phi = PHI_CHAIN (phi))
> +         {
> +           FOR_EACH_PHI_ARG (use, phi, iter, SSA_OP_USE)
> +             {
> +               op = USE_FROM_PTR (use);
> +               if (TREE_CODE (op) == ADDR_EXPR)
> +                 check_rhs_var (op);
> +             }
> +         }
> +
>         for (bsi = bsi_start (this_block); !bsi_end_p (bsi); bsi_next (&bsi))
>           walk_tree (bsi_stmt_ptr (bsi), scan_for_refs, 
>                      fn, visited_nodes);
> 
> doesn't help here at all (it could have helped if one of the PHI arguments
> contained say &s.some_field, but as it contains just &s, it doesn't do
> anything.
> mark_interesting_addressof is only called for addresses of aggr fields
> and has_proper_scope_for_analysis is a nop for automatic variables.
> 

Sigh.  It should be considering &s to be an address taking of the first field.  

Looks like look_for_address_of needs to be fixed.


-- 


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

Reply via email to