Hi,

On Fri, 2 Dec 2011, William J. Schmidt wrote:

> It seems like a fair amount of rip-up to avoid keeping the PHI state 
> around between blocks, so I just check to ensure the PHI definitions 
> occur in the same block before recording their equivalence. 

Then you should at least mix the BB number into the hash value (and 
possibly also check it already in hashable_expr_equal_p) in order to 
reduce number of collissions.

But I wonder why it's not enough to just do a push/pop sequence on 
avail_exprs_stack around your new PHI processing in dom_opt_enter_block, 
ala

+  VEC_safe_push (expr_hash_elt_t, heap, avail_exprs_stack, NULL);
   /* Create equivalences from redundant PHIs.  */
   for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
     eliminate_redundant_computations (&gsi);
+  remove_local_expressions_from_table ();

on top of your current version.  That ought to remove the added PHI 
expressions (and only them) from the hash table but retain the information 
of equality in the const_or_copies_stack.  Checking the BB wouldn't be 
required then.
 

Ciao,
Michael.

Reply via email to