diff options
author | Richard Henderson <rth@redhat.com> | 2000-10-27 14:27:10 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2000-10-27 14:27:10 -0700 |
commit | 10c9f189d4c0730eb59e940edb462b58f58c8457 (patch) | |
tree | 653b97d9dd6fa7d029140cffb94e861a57d7291c | |
parent | 541f7d56299fdc8028f38413dce2fd70bc5a3709 (diff) | |
download | gcc-10c9f189d4c0730eb59e940edb462b58f58c8457.zip gcc-10c9f189d4c0730eb59e940edb462b58f58c8457.tar.gz gcc-10c9f189d4c0730eb59e940edb462b58f58c8457.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/ia64/ia64-protos.h | 1 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 34 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.h | 6 |
4 files changed, 34 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fbb52e6..39e1ff3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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> diff --git a/gcc/config/ia64/ia64-protos.h b/gcc/config/ia64/ia64-protos.h index 839648c..fc1dff1 100644 --- a/gcc/config/ia64/ia64-protos.h +++ b/gcc/config/ia64/ia64-protos.h @@ -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)); diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index dcf3ce1..6790d3f 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -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; } diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h index 9fd78f8..7802e39 100644 --- a/gcc/config/ia64/ia64.h +++ b/gcc/config/ia64/ia64.h @@ -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 |