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/emit-rtl.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/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 56 |
1 files changed, 3 insertions, 53 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 07e9086..ff3b444 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -123,7 +123,6 @@ rtx const_int_rtx[MAX_SAVED_CONST_INT * 2 + 1]; rtx pc_rtx; rtx ret_rtx; rtx simple_return_rtx; -rtx cc0_rtx; /* Marker used for denoting an INSN, which should never be accessed (i.e., this pointer should normally never be dereferenced), but is required to be @@ -2847,14 +2846,13 @@ verify_rtx_sharing (rtx orig, rtx insn) case LABEL_REF: case CODE_LABEL: case PC: - case CC0: case RETURN: case SIMPLE_RETURN: case SCRATCH: /* SCRATCH must be shared because they represent distinct values. */ return; case CLOBBER: - /* Share clobbers of hard registers (like cc0), but do not share pseudo reg + /* Share clobbers of hard registers, but do not share pseudo reg clobbers or clobbers of hard registers that originated as pseudos. This is needed to allow safe register renaming. */ if (REG_P (XEXP (x, 0)) @@ -3100,14 +3098,13 @@ repeat: case LABEL_REF: case CODE_LABEL: case PC: - case CC0: case RETURN: case SIMPLE_RETURN: case SCRATCH: /* SCRATCH must be shared because they represent distinct values. */ return; case CLOBBER: - /* Share clobbers of hard registers (like cc0), but do not share pseudo reg + /* Share clobbers of hard registers, but do not share pseudo reg clobbers or clobbers of hard registers that originated as pseudos. This is needed to allow safe register renaming. */ if (REG_P (XEXP (x, 0)) @@ -3223,7 +3220,6 @@ repeat: case SYMBOL_REF: case CODE_LABEL: case PC: - case CC0: case RETURN: case SIMPLE_RETURN: return; @@ -3717,50 +3713,6 @@ prev_active_insn (rtx_insn *insn) return insn; } -/* Return the next insn that uses CC0 after INSN, which is assumed to - set it. This is the inverse of prev_cc0_setter (i.e., prev_cc0_setter - applied to the result of this function should yield INSN). - - Normally, this is simply the next insn. However, if a REG_CC_USER note - is present, it contains the insn that uses CC0. - - Return 0 if we can't find the insn. */ - -rtx_insn * -next_cc0_user (rtx_insn *insn) -{ - rtx note = find_reg_note (insn, REG_CC_USER, NULL_RTX); - - if (note) - return safe_as_a <rtx_insn *> (XEXP (note, 0)); - - insn = next_nonnote_insn (insn); - if (insn && NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE) - insn = as_a <rtx_sequence *> (PATTERN (insn))->insn (0); - - if (insn && INSN_P (insn) && reg_mentioned_p (cc0_rtx, PATTERN (insn))) - return insn; - - return 0; -} - -/* Find the insn that set CC0 for INSN. Unless INSN has a REG_CC_SETTER - note, it is the previous insn. */ - -rtx_insn * -prev_cc0_setter (rtx_insn *insn) -{ - rtx note = find_reg_note (insn, REG_CC_SETTER, NULL_RTX); - - if (note) - return safe_as_a <rtx_insn *> (XEXP (note, 0)); - - insn = prev_nonnote_insn (insn); - gcc_assert (sets_cc0_p (PATTERN (insn))); - - return insn; -} - /* Find a RTX_AUTOINC class rtx which matches DATA. */ static int @@ -5687,12 +5639,11 @@ copy_insn_1 (rtx orig) case SYMBOL_REF: case CODE_LABEL: case PC: - case CC0: case RETURN: case SIMPLE_RETURN: return orig; case CLOBBER: - /* Share clobbers of hard registers (like cc0), but do not share pseudo reg + /* Share clobbers of hard registers, but do not share pseudo reg clobbers or clobbers of hard registers that originated as pseudos. This is needed to allow safe register renaming. */ if (REG_P (XEXP (orig, 0)) @@ -6413,7 +6364,6 @@ init_emit_once (void) pc_rtx = gen_rtx_fmt_ (PC, VOIDmode); ret_rtx = gen_rtx_fmt_ (RETURN, VOIDmode); simple_return_rtx = gen_rtx_fmt_ (SIMPLE_RETURN, VOIDmode); - cc0_rtx = gen_rtx_fmt_ (CC0, VOIDmode); invalid_insn_rtx = gen_rtx_INSN (VOIDmode, /*prev_insn=*/NULL, /*next_insn=*/NULL, |