This is the mail archive of the gcc-patches@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: PATCH: extra machine-dependent passes



> I think you need to describe the issue to the folks on the gcc list
> before they can properly evaluate this patch.

OK, here's the background: The port I'm working on has a few registers
that are similar to the MIPS gp register, but because of a shortage of
registers, they must be available for general use also.  So, I emit a
move to a pseudo at the beginning of the function, much like the alpha
saves it's return address register, to keep track of that value.

However, when a function is inlined, the integrator "stitches
together" the registers used for argument passing, but *not* these
other registers.  So, I need to step in at that point and "finish the
job" by finding all those special inlined moves and replacing the src
with the pseudo from the parent function.

The pre-alloc hook is intended to, at some point, try to force a
preference for these pseudos to simply remain in their hard regs,
since the chip is designed to work best that way.  GCC does OK without
it, but not as good as I'd like in some cases.

> We *really* want to avoid adding these kinds of hooks.  They're
> notoriously bad from a maintenance standpoint.

I'm open to suggestions, but nothing else has worked yet.  There's a
huge gap between rtl generation and machine dependent reorg where the
backend has little control over what's happening, and most of the
hooks only work with optimization, which isn't sufficient for this
case.


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