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

Daniel Berlin dberlin@dberlin.org
Fri Jun 6 19:58:00 GMT 2003


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.


IE into-ssa makes the following:
BLOCK 13, preds 2, 1
a_8 = PHI<a_9 (1), a_10 (2)>

Later, an edge insertion causes the following (due to creation of a new 
block):
BLOCK 13, preds 2, 1, 15
a_8 = PHI<a_9 (1), a_10 (2)>

out-of-ssa will then abort eliminating the phi because it expects it to 
have some argument associated with the edge from 15, and it doesn't.


This is where the abort occurs  in eliminate_phi:
1130    #if defined ENABLE_CHECKING
1131      if (i == -1)
1132        abort ();
1133    #endif


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?

--Dan



More information about the Gcc mailing list