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] O(1) PHI argument look-up - Part 10/n


On Tue, 2004-11-23 at 11:15 -0500, Kazu Hirata wrote:

> @@ -393,15 +393,9 @@ set_phi_nodes (basic_block bb, tree l)
>  static inline int
>  phi_arg_from_edge (tree phi, edge e)
>
This should return 'unsigned' now.  But you could revise this in the
subsequent patch to remove the asserts looking for -1.

> @@ -286,22 +285,27 @@ verify_phi_args (tree phi, basic_block b
>        goto error;
>      }
>  
> -  /* Mark all the incoming edges.  */
> -  FOR_EACH_EDGE (e, ei, bb->preds)
> -    e->aux = (void *) 1;
> -
>    for (i = 0; i < phi_num_args; i++)
>      {
>        tree op = PHI_ARG_DEF (phi, i);
>  
> +      e = PHI_ARG_EDGE (phi, i);
> +
> +      if (!op)
>
I prefer op == NULL_TREE.

> -#define PHI_ARG_EDGE(NODE, I)		PHI_NODE_ELT_CHECK (NODE, I).e
> +#define PHI_ARG_EDGE(NODE, I) 		(EDGE_PRED (bb_for_stmt ((NODE)), (I)))
>
s/bb_for_stmt/PHI_BB/

The rest looks OK.


Diego.


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