This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCC 2.95.1 appears to hang on ARM


> Date: Fri, 10 Sep 1999 17:36:55 -0400
> From: scottb <scottb@netwinder.org>

> The compiler is displaying an O(X^2) behaviour on the length of the
> a^=a+a chain

> Anyone have any ideas?

I don't have a specific idea what the problem may be, but here is a
general comment:

Sure, two ideas come to mind.  First, it may be that the compiler is
doing something stupid.  Find the `loop'.  See if the compiler does
something stupid (for example, calculates the same answer over and
over again).  A possibility might be to use caching so as to not reask
the same question, or find a way to rephrase the question to get the
same answer (or even nearly the same), but using a slightly different
question that isn't as intensive.

If it was doing something reasonable, then you might be able to
introduce a limiter of some sort on the branching the compiler does,
instead of the otherwise `natural' solution.  For for example, instead
of scanning all insns, you scan only up to 50 insns.  This type of
solution is kinda a hack (better to refine the algorithm used to `just
work', but, in the short term, it should be ok.

Track it down, and let us know...  As you provide more specific
information, my guess is the others may be able to provide specific
ideas on improving it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]