From: Richard Henderson <richard@atheist.tamu.edu>
Subject: Re: other gcc problem
Date: Wed, 15 May 1996 01:46:34 -0500 (CDT) [thread overview]
Message-ID: <m0uJaM0-0001rNC@atheist.tamu.edu> (raw)
In-Reply-To: <9605142042.AA08411@nova.tat.physik.uni-tuebingen.de>
> with anything but "-O0" takes >800 seconds on a XL266, "-O0" takes only
> ~3 seconds and on my i486 "gcc -O2" takes ~9 seconds.
There is a bit of over-aggressiveness in the combiner as it tries
to simplify the entire function as a set of nested if-then-else
expressions to see if the return value is constant.
Unfortunately, this creates an expression tree that leads to
exponential run-times later on.
I would suspect this nastiness to be triggered on any target that
supports conditional moves. Which explains why the problem does
not show up on the i386 target.
Though this is not a particularly good solution, it will let you
get on with your work while a more permanent fix is explored.
Expect a bit of fuzz on the patch.
r~
--- combine.c.orig Tue Apr 16 15:00:58 1996
+++ combine.c Wed May 15 00:50:41 1996
@@ -3049,6 +3086,8 @@ simplify_rtx (x, op0_mode, last, in_dest
SUBST (XEXP (x, 0), gen_binary (PLUS, mode, new, temp));
}
+#if 0
+ /* While logically correct, this can result in exponential run time. */
/* If this is a simple operation applied to an IF_THEN_ELSE, try
applying it to the arms of the IF_THEN_ELSE. This often simplifies
things. Check for cases where both arms are testing the same
@@ -3120,6 +3159,7 @@ simplify_rtx (x, op0_mode, last, in_dest
op0_mode = VOIDmode;
}
}
+#endif
/* Try to fold this expression in case we have constants that weren't
present before. */
next prev parent reply other threads:[~1996-05-15 6:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-05-14 17:40 other gcc problem Harald Koenig
1996-05-14 21:56 ` Richard Henderson
1996-05-14 23:01 ` Harald Koenig
1996-05-15 6:46 ` Richard Henderson [this message]
-- strict thread matches above, loose matches on Subject: below --
1996-05-14 20:57 David Mosberger
[not found] <199605142057.NAA05396@web.azstarnet.com>
1996-05-14 21:36 ` Harald Koenig
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox