New SAFE immediate use iterator

Andrew MacLeod amacleod@redhat.com
Fri Apr 28 17:10:00 GMT 2006


On Fri, 2006-04-28 at 18:24 +0200, Andreas Schwab wrote:
> Andrew MacLeod <amacleod@redhat.com> writes:
> 
> > On Thu, 2006-04-27 at 09:52 -0600, Jeffrey A Law wrote:

> >> I haven't looked at the patch itself, but my gut feeling is that the
> >> patch is suitable for mainline and after a period of time to shake out,
> >> probably 4.1.x (after consulting with Mark of course).
> >
> > Checked into mainline.
> 
> It breaks bootstrap on ia64:
> 
> ../../../libjava/java/lang/natObject.cc: In member function 'void java::lang::Object::wait(jlong, jint)':
> ../../../libjava/java/lang/natObject.cc:1256: internal compiler error: in propagate_rhs_into_lhs, at tree-ssa-dom.c:2307
> 

I'm taking a look now.

upon closer inspection, I suspect I got the logic to the assert wrong.
the code in DOM that use to check for the bug and force an iterate was:

      if (all && !has_zero_uses (lhs))
        goto repeat;

The assert current reads:

      gcc_assert (all && has_zero_uses (lhs));


I think it *should* read 

   gcc_assert (!all || has_zero_uses (lhs));

Its sometimes the case that all uses aren't rewritten in this algorithm,
but if the algorithm thinks they are all rewritten, it sets 'all' to
TRUE. in this case, has_zero_uses() ought to be true as well.

Try changing the assert to the latter one.  That should allow 'all ==
FALSE' to pass through, which I suspect is the bug you've tripped over.
My build is still a while from getting there :-)

Andrew



More information about the Gcc-patches mailing list