ia64.c: Revert 10-23 patch.

* config/ia64/ia64.c: Revert 10-23 patch.
        (ia64_hard_regno_rename_ok): New.
        * config/ia64/ia64-protos.h: Declare it.
        * config/ia64/ia64.h (HARD_REGNO_RENAME_OK): Use it.

From-SVN: r37090
This commit is contained in:
Richard Henderson 2000-10-27 14:27:10 -07:00 committed by Richard Henderson
parent 541f7d5629
commit 10c9f189d4
4 changed files with 34 additions and 14 deletions

View File

@ -1,3 +1,10 @@
2000-10-27 Richard Henderson <rth@redhat.com>
* config/ia64/ia64.c: Revert 10-23 patch.
(ia64_hard_regno_rename_ok): New.
* config/ia64/ia64-protos.h: Declare it.
* config/ia64/ia64.h (HARD_REGNO_RENAME_OK): Use it.
2000-10-27 Bernd Schmidt <bernds@redhat.co.uk>
Richard Henderson <rth@redhat.com>

View File

@ -82,6 +82,7 @@ extern void ia64_function_epilogue PARAMS((FILE *, int));
extern int ia64_direct_return PARAMS((void));
extern void ia64_expand_load_address PARAMS((rtx, rtx));
extern int ia64_hard_regno_rename_ok PARAMS((int, int));
extern void ia64_initialize_trampoline PARAMS((rtx, rtx, rtx));
extern void ia64_print_operand_address PARAMS((FILE *, rtx));

View File

@ -1852,12 +1852,6 @@ ia64_expand_prologue ()
reg_names[OUT_REG (i)] = ia64_reg_numbers[inputs + locals + i];
}
/* ??? Temporarily mark the remaining output registers fixed, so
that the register renaming pass does not try to used them after
we've fixed the size of the register frame. */
for (i = current_frame_info.n_output_regs; i < 8; ++i)
fixed_regs[OUT_REG (i)] = 1;
/* Set the frame pointer register name. The regnum is logically loc79,
but of course we'll not have allocated that many locals. Rather than
worrying about renumbering the existing rtxs, we adjust the name. */
@ -2393,6 +2387,31 @@ ia64_direct_return ()
return 0;
}
int
ia64_hard_regno_rename_ok (from, to)
int from;
int to;
{
/* Don't clobber any of the registers we reserved for the prologue. */
if (to == current_frame_info.reg_fp
|| to == current_frame_info.reg_save_b0
|| to == current_frame_info.reg_save_pr
|| to == current_frame_info.reg_save_ar_pfs
|| to == current_frame_info.reg_save_ar_unat
|| to == current_frame_info.reg_save_ar_lc)
return 0;
/* Don't use output registers outside the register frame. */
if (OUT_REGNO_P (to) && to >= OUT_REG (current_frame_info.n_output_regs))
return 0;
/* Retain even/oddness on predicate register pairs. */
if (PR_REGNO_P (from) && PR_REGNO_P (to))
return (from & 1) == (to & 1);
return 1;
}
/* Emit the function prologue. */
void
@ -2503,9 +2522,6 @@ ia64_function_epilogue (file, size)
reg_names[OUT_REG (i)] = ia64_output_reg_names[i];
}
for (i = 0; i < 8; ++i)
fixed_regs[OUT_REG (i)] = 0;
current_frame_info.initialized = 0;
}

View File

@ -2643,11 +2643,7 @@ do { \
considered for use as a rename register for REGNO1 */
#define HARD_REGNO_RENAME_OK(REGNO1,REGNO2) \
((! PR_REGNO_P (REGNO1) && ! PR_REGNO_P (REGNO2)) \
? (!call_fixed_regs [REGNO1] && !call_fixed_regs [REGNO2]) \
? 1 : 0 \
: ((REGNO2) > 256 && ((REGNO2 & 1) == 0)) \
? 1 : 0)
ia64_hard_regno_rename_ok((REGNO1), (REGNO2))
/* Define this macro if the compiler should use extended basic blocks
when renaming registers. Define this macro if the target has predicate