Mercurial > hg > CbC > CbC_gcc
diff gcc/sched-deps.c @ 132:d34655255c78
update gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 10:21:07 +0900 |
parents | 84e7813d76e9 |
children | 1830386684a0 |
line wrap: on
line diff
--- a/gcc/sched-deps.c Thu Oct 25 08:08:40 2018 +0900 +++ b/gcc/sched-deps.c Thu Oct 25 10:21:07 2018 +0900 @@ -1,6 +1,6 @@ /* Instruction scheduling pass. This file computes dependencies between instructions. - Copyright (C) 1992-2017 Free Software Foundation, Inc. + Copyright (C) 1992-2018 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) Enhanced by, and currently maintained by, Jim Wilson (wilson@cygnus.com) @@ -2319,6 +2319,13 @@ while (--i >= 0) note_reg_use (regno + i); } + else if (ref == CLOBBER_HIGH) + { + gcc_assert (i == 1); + /* We don't know the current state of the register, so have to treat + the clobber high as a full clobber. */ + note_reg_clobber (regno); + } else { while (--i >= 0) @@ -2342,6 +2349,8 @@ else if (ref == USE) note_reg_use (regno); else + /* For CLOBBER_HIGH, we don't know the current state of the register, + so have to treat it as a full clobber. */ note_reg_clobber (regno); /* Pseudos that are REG_EQUIV to something may be replaced @@ -2834,10 +2843,16 @@ sched_macro_fuse_insns (rtx_insn *insn) { rtx_insn *prev; + /* No target hook would return true for debug insn as any of the + hook operand, and with very large sequences of only debug insns + where on each we call sched_macro_fuse_insns it has quadratic + compile time complexity. */ + if (DEBUG_INSN_P (insn)) + return; prev = prev_nonnote_nondebug_insn (insn); if (!prev) return; - + if (any_condjump_p (insn)) { unsigned int condreg1, condreg2; @@ -2891,7 +2906,8 @@ && code == SET); /* Group compare and branch insns for macro-fusion. */ - if (targetm.sched.macro_fusion_p + if (!deps->readonly + && targetm.sched.macro_fusion_p && targetm.sched.macro_fusion_p ()) sched_macro_fuse_insns (insn); @@ -2916,6 +2932,8 @@ = alloc_INSN_LIST (insn, deps->sched_before_next_jump); /* Make sure epilogue insn is scheduled after preceding jumps. */ + add_dependence_list (insn, deps->last_pending_memory_flush, 1, + REG_DEP_ANTI, true); add_dependence_list (insn, deps->pending_jump_insns, 1, REG_DEP_ANTI, true); } @@ -2953,7 +2971,7 @@ sub = COND_EXEC_CODE (sub); code = GET_CODE (sub); } - if (code == SET || code == CLOBBER) + else if (code == SET || code == CLOBBER || code == CLOBBER_HIGH) sched_analyze_1 (deps, sub, insn); else sched_analyze_2 (deps, sub, insn); @@ -2969,6 +2987,10 @@ { if (GET_CODE (XEXP (link, 0)) == CLOBBER) sched_analyze_1 (deps, XEXP (link, 0), insn); + else if (GET_CODE (XEXP (link, 0)) == CLOBBER_HIGH) + /* We could support CLOBBER_HIGH and treat it in the same way as + HARD_REGNO_CALL_PART_CLOBBERED, but no port needs that yet. */ + gcc_unreachable (); else if (GET_CODE (XEXP (link, 0)) != SET) sched_analyze_2 (deps, XEXP (link, 0), insn); }