[patch] for PR 27865

Diego Novillo dnovillo@redhat.com
Mon Aug 14 17:59:00 GMT 2006


Zdenek Dvorak wrote on 08/08/06 04:20:

> + static bool
> + pointer_used_p (tree ptr)
> + {
> +   use_operand_p use_p;
> +   imm_use_iterator imm_iter;
> +   tree stmt, rhs;
> +
> +   if (get_ptr_info (ptr)->is_dereferenced)
> +     return true;
> +
Hmm, why not test for the presence of a symbol or name tag?  If either
of these is present, the pointer is dereferenced.  Copy propagation
sets that.  But that won't help you when the pointer is used only in
comparisons, so I guess you still need the imm-use traversal.

The rest looks fine.



More information about the Gcc-patches mailing list