------- Comment #3 from dberlin at gcc dot gnu dot org  2006-08-22 12:47 -------
Subject: Re:  remove_phi_node attempts removal
 of a phi node resized by resize_phi_node

pinskia at gcc dot gnu dot org wrote:
> ------- Comment #2 from pinskia at gcc dot gnu dot org  2006-08-22 06:17 
> -------
> We should never had needed resize_phi_node inside PRE and resize_phi_node also
> does an exact replacement so that means you are keeping a reference to the old
> PHI node when adding an edge which is wrong.
> 
> 
PRE never directly calls resize_phi_node
The insert_on_edge call PRE makes should *never* cause the number of
predecessors to change, so i can't see why resize_phi_node would ever be
called.

Without an example case where it does, i can't debug this further.

However, it's not "wrong" to keep a reference to a phi node when a
random edge in the program changes.  The API that doesn't allow such a
thing is just broken. This is a symptom of the fact that our phi node
arguments are stored in "pretend" vectors, even though it would be saner
to use an embedded vec in that structure.  This would allow reallocating
arguments without having to change the entire phi node structure.


-- 


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

Reply via email to