From efc9bd412d3e48467658e5e8c5905669f160dc82 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Fri, 19 May 2000 22:27:28 +0000 Subject: cse.c (cse_basic_block): Only call find_reg_note if REG_NOTES not 0. * cse.c (cse_basic_block): Only call find_reg_note if REG_NOTES not 0. * reload.c (find_equiv_reg): Likewise. * alias.c (init_alias_analysis): Likewise. Only call prologue_epilogue_contains on insns. * basic-block.h (REG_SET_TO_HARD_REG_SET): Call new function. * bb-reorder.c (hard-reg-set.h): Include earlier. * haifa-sched.c (hard-reg-set.h): Likewise. * ifcvt.c (hard-reg-set.h): Likewise. * local-alloc.c (hard-reg-set.h): Likewise. * loop.c (hard-reg-set.h): Likewise. * predict.c (hard-reg-set.h): Likewise. * regrename.c (hard-reg-set.h): Likewise. * flow.c (hard-reg-set.h): Likewise. (reg_set_to_hard_reg_set): New function. * bitmap.c (regs.h, basic-block.h): No longer include. (bitmap.h): Now include. * conflict.c (hard-reg-set.h): Include. * profile.c (hard-reg-set.h): Likewise. * print-rtl.c (hard-reg-set.h): Likewise. * sbitmap.c (hard-reg-set.h): Likewise. * toplev.c (hard-reg-set.h): Likewise. * unroll.c (hard-reg-set.h, basic-block.h): Likewise. * hard-reg-set.h (reg_names): Now constant. * regs.h (reg_names): Likewise. * regclass.c (reg_names): Likewise. * loop.h (basic-block.h): No longer include. (bitmap.h): Now include. * reload1.c (order_regs_for_reload): Avoid loop over reg sets. * Makefile.in (LOOP_H, sbitmap.o, profile.o): Reflect above changes. (toplev.o, print-rtl.o, conflict.o, unroll.o, bitmap.o): Likewise. From-SVN: r34039 --- gcc/reload.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) (limited to 'gcc/reload.c') diff --git a/gcc/reload.c b/gcc/reload.c index e1f5838..e94a303 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -6032,27 +6032,30 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode) /* If we are looking for a constant, and something equivalent to that constant was copied into a reg, we can use that reg. */ - || (goal_const && (tem = find_reg_note (p, REG_EQUIV, - NULL_RTX)) - && rtx_equal_p (XEXP (tem, 0), goal) - && (valueno = true_regnum (valtry = SET_DEST (pat))) >= 0) - || (goal_const && (tem = find_reg_note (p, REG_EQUIV, - NULL_RTX)) - && GET_CODE (SET_DEST (pat)) == REG - && GET_CODE (XEXP (tem, 0)) == CONST_DOUBLE - && GET_MODE_CLASS (GET_MODE (XEXP (tem, 0))) == MODE_FLOAT - && GET_CODE (goal) == CONST_INT - && 0 != (goaltry = operand_subword (XEXP (tem, 0), 0, 0, + || (goal_const && REG_NOTES (p) != 0 + && (tem = find_reg_note (p, REG_EQUIV, NULL_RTX)) + && ((rtx_equal_p (XEXP (tem, 0), goal) + && (valueno + = true_regnum (valtry = SET_DEST (pat))) >= 0) + || (GET_CODE (SET_DEST (pat)) == REG + && GET_CODE (XEXP (tem, 0)) == CONST_DOUBLE + && (GET_MODE_CLASS (GET_MODE (XEXP (tem, 0))) + == MODE_FLOAT) + && GET_CODE (goal) == CONST_INT + && 0 != (goaltry + = operand_subword (XEXP (tem, 0), 0, 0, VOIDmode)) - && rtx_equal_p (goal, goaltry) - && (valtry = operand_subword (SET_DEST (pat), 0, 0, - VOIDmode)) - && (valueno = true_regnum (valtry)) >= 0) + && rtx_equal_p (goal, goaltry) + && (valtry + = operand_subword (SET_DEST (pat), 0, 0, + VOIDmode)) + && (valueno = true_regnum (valtry)) >= 0))) || (goal_const && (tem = find_reg_note (p, REG_EQUIV, NULL_RTX)) && GET_CODE (SET_DEST (pat)) == REG && GET_CODE (XEXP (tem, 0)) == CONST_DOUBLE - && GET_MODE_CLASS (GET_MODE (XEXP (tem, 0))) == MODE_FLOAT + && (GET_MODE_CLASS (GET_MODE (XEXP (tem, 0))) + == MODE_FLOAT) && GET_CODE (goal) == CONST_INT && 0 != (goaltry = operand_subword (XEXP (tem, 0), 1, 0, VOIDmode)) @@ -6081,7 +6084,7 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode) /* Don't try to re-use something that is killed in this insn. We want to be able to trust REG_UNUSED notes. */ - if (find_reg_note (where, REG_UNUSED, value)) + if (REG_NOTES (where) != 0 && find_reg_note (where, REG_UNUSED, value)) return 0; /* If we propose to get the value from the stack pointer or if GOAL is -- cgit v1.1