------- Comment #9 from jamborm at gcc dot gnu dot org 2009-07-29 09:51 ------- (In reply to comment #8)
> > ------- Comment #7 from jamborm at gcc dot gnu dot org 2009-07-28 20:59 > > ------- > > So, I belive the patch below fixes this issue and I am going to > > bootstrap it overnight. Honza, can you please confirm this is indeed > > a correct fix? Thanks. > > > + && node->callers->caller->global.inlined_to != node > > That only detects direct loops, does it? I don't understand. This loop consisted of nodes that are going to be inlined, they have only one caller and the incoming edge is marked for inlining. There cannot be any indirect calls or complex cycles or anything. In fact, looking at the inlined edges, the inlined nodes should only form a tree. > IMHO ipa-inline should have computed callgraph SCCs anyway for a > long time now ... we just seem to keep accumulating interesting > workarounds for cycles ;) Well, I don't see how this would help, at least in this particular case. There are cycles in the call graph, we just must not create cycles consisting of edges with inline_failed == NULL. I do not think that explicit tests like this are somehow bad, we would have to test the property one way or another. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40570