This is the mail archive of the gcc-patches@gcc.gnu.org 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: [patch] for PR 27865


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.


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