diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2021-04-23 19:59:00 +0000 |
---|---|---|
committer | Segher Boessenkool <segher@kernel.crashing.org> | 2021-05-04 13:53:50 +0000 |
commit | bd1cd0d0e0fecc6ac8632c266591767392480746 (patch) | |
tree | 8159e6c3badfa65e1d4462c94ac7285a572ba6ee /gcc/cfgcleanup.c | |
parent | 7a3897661151cf8cc77d11f7a98fc64259210748 (diff) | |
download | gcc-bd1cd0d0e0fecc6ac8632c266591767392480746.zip gcc-bd1cd0d0e0fecc6ac8632c266591767392480746.tar.gz gcc-bd1cd0d0e0fecc6ac8632c266591767392480746.tar.bz2 |
Remove CC0
This removes CC0 and all directly related infrastructure.
CC_STATUS, CC_STATUS_MDEP, CC_STATUS_MDEP_INIT, and NOTICE_UPDATE_CC
are deleted and poisoned. CC0 is only deleted (some targets use that
name for something else). HAVE_cc0 is automatically generated, and we
no longer will do that after this patch.
CC_STATUS_INIT is suggested in final.c to also be useful for ports that
are not CC0, and at least arm seems to use it for something. So I am
leaving that alone, but most targets that have it could remove it.
2021-05-04 Segher Boessenkool <segher@kernel.crashing.org>
* caller-save.c: Remove CC0.
* cfgcleanup.c: Remove CC0.
* cfgrtl.c: Remove CC0.
* combine.c: Remove CC0.
* compare-elim.c: Remove CC0.
* conditions.h: Remove CC0.
* config/h8300/h8300.h: Remove CC0.
* config/h8300/h8300-protos.h: Remove CC0.
* config/h8300/peepholes.md: Remove CC0.
* config/i386/x86-tune-sched.c: Remove CC0.
* config/m68k/m68k.c: Remove CC0.
* config/rl78/rl78.c: Remove CC0.
* config/sparc/sparc.c: Remove CC0.
* config/xtensa/xtensa.c: Remove CC0.
(gen_conditional_move): Use pc_rtx instead of cc0_rtx in a piece of
RTL where that is used as a placeholder only.
* cprop.c: Remove CC0.
* cse.c: Remove CC0.
* cselib.c: Remove CC0.
* df-problems.c: Remove CC0.
* df-scan.c: Remove CC0.
* doc/md.texi: Remove CC0. Adjust an example.
* doc/rtl.texi: Remove CC0. Adjust an example.
* doc/tm.texi: Regenerate.
* doc/tm.texi.in: Remove CC0.
* emit-rtl.c: Remove CC0.
* final.c: Remove CC0.
* fwprop.c: Remove CC0.
* gcse-common.c: Remove CC0.
* gcse.c: Remove CC0.
* genattrtab.c: Remove CC0.
* genconfig.c: Remove CC0.
* genemit.c: Remove CC0.
* genextract.c: Remove CC0.
* gengenrtl.c: Remove CC0.
* genrecog.c: Remove CC0.
* haifa-sched.c: Remove CC0.
* ifcvt.c: Remove CC0.
* ira-costs.c: Remove CC0.
* ira.c: Remove CC0.
* jump.c: Remove CC0.
* loop-invariant.c: Remove CC0.
* lra-constraints.c: Remove CC0.
* lra-eliminations.c: Remove CC0.
* optabs.c: Remove CC0.
* postreload-gcse.c: Remove CC0.
* postreload.c: Remove CC0.
* print-rtl.c: Remove CC0.
* read-rtl-function.c: Remove CC0.
* reg-notes.def: Remove CC0.
* reg-stack.c: Remove CC0.
* reginfo.c: Remove CC0.
* regrename.c: Remove CC0.
* reload.c: Remove CC0.
* reload1.c: Remove CC0.
* reorg.c: Remove CC0.
* resource.c: Remove CC0.
* rtl.c: Remove CC0.
* rtl.def: Remove CC0.
* rtl.h: Remove CC0.
* rtlanal.c: Remove CC0.
* sched-deps.c: Remove CC0.
* sched-rgn.c: Remove CC0.
* shrink-wrap.c: Remove CC0.
* simplify-rtx.c: Remove CC0.
* system.h: Remove CC0. Poison NOTICE_UPDATE_CC, CC_STATUS_MDEP_INIT,
CC_STATUS_MDEP, and CC_STATUS.
* target.def: Remove CC0.
* valtrack.c: Remove CC0.
* var-tracking.c: Remove CC0.
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r-- | gcc/cfgcleanup.c | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 260a896..f05cb61 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -1449,12 +1449,6 @@ flow_find_cross_jump (basic_block bb1, basic_block bb2, rtx_insn **f1, i2 = PREV_INSN (i2); } - /* Don't allow the insn after a compare to be shared by - cross-jumping unless the compare is also shared. */ - if (HAVE_cc0 && ninsns && reg_mentioned_p (cc0_rtx, last1) - && ! sets_cc0_p (last1)) - last1 = afterlast1, last2 = afterlast2, last_dir = afterlast_dir, ninsns--; - /* Include preceding notes and labels in the cross-jump. One, this may bring us to the head of the blocks as requested above. Two, it keeps line number notes as matched as may be. */ @@ -1571,12 +1565,6 @@ flow_find_head_matching_sequence (basic_block bb1, basic_block bb2, rtx_insn **f i2 = NEXT_INSN (i2); } - /* Don't allow a compare to be shared by cross-jumping unless the insn - after the compare is also shared. */ - if (HAVE_cc0 && ninsns && reg_mentioned_p (cc0_rtx, last1) - && sets_cc0_p (last1)) - last1 = beforelast1, last2 = beforelast2, ninsns--; - if (ninsns) { *f1 = last1; @@ -2340,12 +2328,7 @@ try_head_merge_bb (basic_block bb) cond = get_condition (jump, &move_before, true, false); if (cond == NULL_RTX) - { - if (HAVE_cc0 && reg_mentioned_p (cc0_rtx, jump)) - move_before = prev_nonnote_nondebug_insn (jump); - else - move_before = jump; - } + move_before = jump; for (ix = 0; ix < nedges; ix++) if (EDGE_SUCC (bb, ix)->dest == EXIT_BLOCK_PTR_FOR_FN (cfun)) @@ -2505,12 +2488,7 @@ try_head_merge_bb (basic_block bb) jump = BB_END (final_dest_bb); cond = get_condition (jump, &move_before, true, false); if (cond == NULL_RTX) - { - if (HAVE_cc0 && reg_mentioned_p (cc0_rtx, jump)) - move_before = prev_nonnote_nondebug_insn (jump); - else - move_before = jump; - } + move_before = jump; } do @@ -2527,11 +2505,6 @@ try_head_merge_bb (basic_block bb) /* Try again, using a different insertion point. */ move_before = jump; - /* Don't try moving before a cc0 user, as that may invalidate - the cc0. */ - if (HAVE_cc0 && reg_mentioned_p (cc0_rtx, jump)) - break; - continue; } @@ -2585,11 +2558,6 @@ try_head_merge_bb (basic_block bb) /* For the unmerged insns, try a different insertion point. */ move_before = jump; - /* Don't try moving before a cc0 user, as that may invalidate - the cc0. */ - if (HAVE_cc0 && reg_mentioned_p (cc0_rtx, jump)) - break; - for (ix = 0; ix < nedges; ix++) currptr[ix] = headptr[ix] = nextptr[ix]; } |