From 484df9889535b64885a5fdf136c7637ab2a054e9 Mon Sep 17 00:00:00 2001 From: Jeffrey A Law Date: Mon, 25 Aug 1997 19:15:01 +0000 Subject: [PATCH] haifa-sched.c (find_pre_sched_live): Remove #if 0 code. * haifa-sched.c (find_pre_sched_live): Remove #if 0 code. (find_post_sched_live): Likewise. Just cleaning up. * haifa-sched.c (schedule_block): Remove old code to get arguments from hard regs into pseudos early. Avoids problems with bogus REG_LOOP_BEGIN notes causing aborts during and after register allocation. From-SVN: r14918 --- gcc/ChangeLog | 8 ++++++ gcc/haifa-sched.c | 64 +++++------------------------------------------ 2 files changed, 14 insertions(+), 58 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 31669268382..4b9c91f996c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +Mon Aug 25 13:12:24 1997 Jeffrey A Law (law@cygnus.com) + + * haifa-sched.c (find_pre_sched_live): Remove #if 0 code. + (find_post_sched_live): Likewise. + + * haifa-sched.c (schedule_block): Remove old code to get arguments + from hard regs into pseudos early. + Mon Aug 25 08:55:00 1997 Jeffrey A Law (law@cygnus.com) * version.c: Bump for new snapshot. diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index bc7e826529e..dd9e507adf5 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -5194,9 +5194,6 @@ find_pre_sched_live (bb) && ! fixed_regs[j]) { SET_REGNO_REG_SET (bb_live_regs, j); -#if 0 - CLEAR_REGNO_REG_SET (bb_dead_regs, j); -#endif } } @@ -5368,9 +5365,6 @@ find_post_sched_live (bb) && ! fixed_regs[i]) { CLEAR_REGNO_REG_SET (bb_live_regs, i); -#if 0 - SET_REGNO_REG_SET (bb_dead_regs, i); -#endif } /* Regs live at the time of a call instruction must not @@ -6577,59 +6571,13 @@ schedule_block (bb, rgn, rgn_n_insns) rtx tail; int bb_src; - /* At the start of a function, before reload has run, don't delay getting - parameters from hard registers into pseudo registers. */ - if (reload_completed == 0 && b == 0) - { - head = basic_block_head[b]; - tail = basic_block_end[b]; - - while (head != tail - && GET_CODE (head) == NOTE - && NOTE_LINE_NUMBER (head) != NOTE_INSN_FUNCTION_BEG) - head = NEXT_INSN (head); - - while (head != tail - && GET_CODE (head) == INSN - && GET_CODE (PATTERN (head)) == SET) - { - rtx link; - rtx src = SET_SRC (PATTERN (head)); - while (GET_CODE (src) == SUBREG - || GET_CODE (src) == SIGN_EXTEND - || GET_CODE (src) == ZERO_EXTEND - || GET_CODE (src) == SIGN_EXTRACT - || GET_CODE (src) == ZERO_EXTRACT) - src = XEXP (src, 0); - if (GET_CODE (src) != REG - || REGNO (src) >= FIRST_PSEUDO_REGISTER) - break; - - for (link = INSN_DEPEND (head); link != 0; link = XEXP (link, 1)) - INSN_DEP_COUNT (XEXP (link, 0)) -= 1; - - if (GET_CODE (head) != NOTE) - sched_n_insns++; + /* We used to have code to avoid getting parameters moved from hard + argument registers into pseudos. - head = NEXT_INSN (head); - } - - /* Don't include any notes or labels at the beginning of the - basic block, or notes at the ends of basic blocks. */ - while (head != tail) - { - if (GET_CODE (head) == NOTE) - head = NEXT_INSN (head); - else if (GET_CODE (tail) == NOTE) - tail = PREV_INSN (tail); - else if (GET_CODE (head) == CODE_LABEL) - head = NEXT_INSN (head); - else - break; - } - } - else - get_block_head_tail (bb, &head, &tail); + However, it was removed when it proved to be of marginal benefit + and caused problems because schedule_block and compute_forward_dependences + had different notions of what the "head" insn was. */ + get_block_head_tail (bb, &head, &tail); next_tail = NEXT_INSN (tail); prev_head = PREV_INSN (head); -- 2.30.2