[tree-ssa]: out-of-ssa breaks if something adds a pred

Daniel Berlin dberlin@dberlin.org
Fri Jun 6 20:09:00 GMT 2003


On Friday, June 6, 2003, at 04:08  PM, Chris Lattner wrote:

>
> Daniel Berlin said:
>
>> When something ends up adding a predecessor block to a block with 
>> phi's
>> in it, out-of-ssa breaks. This is because it expects all the phi's to
>> have the same number of args/edges as preds, but phi's created 
>> *before*
>> the pred was added have one less argument/edge.
>
> ...
>
>> Unless i'm having a stupid moment, this really shouldn't be an abort
>> case. If a phi doesn't have an argument for a given edge, it means
>> nothing needs to be done for that edge, no?
>
> IMO, this is a failure of the edge insertion routines or the caller of 
> the
> routine.

Well, the caller can't know what the inserter did, and what to do to 
the possibly affected phi's.

Plus, the current way we create phi nodes would mean that we'd have to 
rebuild all the phi's (their number of arguments is fixed at creation 
time).
Diego, what to do here?

>   An invariant in SSA is that the number of entries in a PHI node
> must be equal to the number of predecessors.  The out-of-ssa pass is
> correct to break if this is not true...
>
> -Chris
>
> -- 
> http://llvm.cs.uiuc.edu/
> http://www.nondot.org/~sabre/Projects/
>



More information about the Gcc mailing list