Help with new port: infinite looping in reload
Ian Lance Taylor
ian@airs.com
Wed Dec 22 15:53:00 GMT 2004
Robert Baruch <autophile@gmail.com> writes:
> In any case, after a week of work, I've come up with a minimal machine
> definition that doesn't abort in the RTL generation phase, where the
> build tries to compile _muldi3 in libgcc2. It makes it all the way to
> the reload phase where gcc goes into an infinite loop, continually
> increasing the frame size and not getting much of anywhere else.
>
> The code keeps calling eliminate_regs with RTL's like this:
>
> (mem:SI (plus:QI (reg/f:QI 19 virtual-incoming-args)
> (const_int -107 [0xffffff95])) [17 S4 A8])
>
> and there are hundreds of them.
>
> I've been working on this issue for a while and I can't figure out
> what is preventing gcc from breaking out of the loop.
>
> The loop that's causing the problem is specifically in reload1.c lines
> 880 - 959. Since the frame size keeps increasing, the code does not
> get past line 959.
This implies that the compiler keeps allocating another stack entry,
most likely via a call to assign_stack_local(). Put a breakpoint
there and figure out why it is being called.
I didn't actually look at your source code, but it suggests something
weird in LEGIMITIZE_RELOAD_ADDRESS. Or maybe you are not paying
attention to REG_OK_STRICT in GO_IF_LEGITIMATE_ADDRESS (one of the
ickier parts of the tm.h file). Or it could be something else
entirely.
Ian
More information about the Gcc
mailing list