This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Help with new port: infinite looping in reload
- From: Ian Lance Taylor <ian at airs dot com>
- To: Robert Baruch <autophile at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 22 Dec 2004 10:42:38 -0500
- Subject: Re: Help with new port: infinite looping in reload
- References: <bbac368c041221193612667939@mail.gmail.com>
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