On Thu, 1 Dec 2011, Diego Novillo wrote: > On Thu, Dec 1, 2011 at 05:59, Richard Guenther <rguent...@suse.de> wrote: > > On Tue, 29 Nov 2011, Diego Novillo wrote: > > > >> On Tue, Nov 29, 2011 at 12:49, H.J. Lu <hjl.to...@gmail.com> wrote: > >> > >> > This caused: > >> > > >> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51346 > >> > >> Thanks. I'm on it. > > > > The patch was wrong, please revert it. At the gimple stmt > > modification level we shouldn't modify the cgraph. That's > > a layering violation at least. > > No, this is a pre-existing problem that got aggravated with the new > changes to the inline attribute in fold. I think we need to either > toss out the edge attribute or make it such that they are more > automatically sync'd. Unfortunately, we cannot get rid of it, since > we sometimes do not have the statement. > > So, we have to live with the two attributes. How about, we make the
Yes. And I've fixed all places I could find sofar to update them. > edge attribute always dependent on the statement? If the statement > exists, the edge attribute always take its value from it. Only when > the statement doesn't exist, we take its value from the call. All > this can be put into a small predicate. Sure, but then you can still have the issue of an inconsistency. Thus, would you then remove the remaining asserts? I believe in the end the proper fix is to _not_ throw away cgraph edges all the time, but keep them up-to-date and thus make the stmt flag not necessary. (we can define "up-to-date" in a way so that we only require that existing edges that still have a call stmt have to be valid, thus still require incremental recomputation to remove dead edges and create new ones) > > Please file a bug with a reduced testcase that still fails > > without your fix. > > I'll add a test to the final patch after it finishes reducing (the > original test case is huge). Which pass did the folding of the stmt but did not adjust the edge flag? Richard.