Re: new register allocator and HARD_REGNO_CALL_PART_CLOBBERED
Dale Johannesen <dalej <at> apple.com>
2003-05-01 00:30:53 GMT
On Wednesday, April 30, 2003, at 12:31 PM, Herman ten Brugge wrote:
> Hello,
>
> I found a problem with the -fnew-ra option of the compiler. I analysed
> the problem and found that the macro HARD_REGNO_CALL_PART_CLOBBERED
> is not used by the new register allocator.
> I think this is also a bit difficult to implement because we now
> have to check the mode for every register that is used during a
> CALL_INSN.
You can try the following (mail may have screwed up spacing). It may
result in even worse code than your patch, but maybe it's better than
trying to work around this new-ra problem in individual targets.
(Untested, I do not have a c4x.)
*** df.c Thu Apr 17 13:30:04 2003
--- /Volumes/MacOS9/gcc/gcc3.preimport/gcc/df.c Fri Apr 4 10:33:25 2003
*************** df_insn_refs_record (df, bb, insn)
*** 1282,1301 ****
df_uses_record (df, &PATTERN (insn),
DF_REF_REG_USE, bb, insn, 0);
if (GET_CODE (insn) == CALL_INSN)
{
rtx note;
if (df->flags & DF_HARD_REGS)
! {
! /* Kill all registers invalidated by a call. */
(Continue reading)