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/reload.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/reload.c')
-rw-r--r-- | gcc/reload.c | 48 |
1 files changed, 3 insertions, 45 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index e18e27c..d21be91 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -1500,27 +1500,6 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc, if (in != 0 && in != *inloc) rld[i].nocombine = 1; -#if 0 - /* This was replaced by changes in find_reloads_address_1 and the new - function inc_for_reload, which go with a new meaning of reload_inc. */ - - /* If this is an IN/OUT reload in an insn that sets the CC, - it must be for an autoincrement. It doesn't work to store - the incremented value after the insn because that would clobber the CC. - So we must do the increment of the value reloaded from, - increment it, store it back, then decrement again. */ - if (out != 0 && sets_cc0_p (PATTERN (this_insn))) - { - out = 0; - rld[i].out = 0; - rld[i].inc = find_inc_amount (PATTERN (this_insn), in); - /* If we did not find a nonzero amount-to-increment-by, - that contradicts the belief that IN is being incremented - in an address in this insn. */ - gcc_assert (rld[i].inc != 0); - } -#endif - /* If we will replace IN and OUT with the reload-reg, record where they are located so that substitution need not do a tree walk. */ @@ -2696,17 +2675,10 @@ find_reloads (rtx_insn *insn, int replace, int ind_levels, int live_known, } } - /* JUMP_INSNs and CALL_INSNs are not allowed to have any output reloads; - neither are insns that SET cc0. Insns that use CC0 are not allowed - to have any input reloads. */ + /* JUMP_INSNs and CALL_INSNs are not allowed to have any output reloads. */ if (JUMP_P (insn) || CALL_P (insn)) no_output_reloads = 1; - if (HAVE_cc0 && reg_referenced_p (cc0_rtx, PATTERN (insn))) - no_input_reloads = 1; - if (HAVE_cc0 && reg_set_p (cc0_rtx, PATTERN (insn))) - no_output_reloads = 1; - /* The eliminated forms of any secondary memory locations are per-insn, so clear them out here. */ @@ -4585,15 +4557,6 @@ find_reloads (rtx_insn *insn, int replace, int ind_levels, int live_known, rld[j].in = 0; } - /* If we made any reloads for addresses, see if they violate a - "no input reloads" requirement for this insn. But loads that we - do after the insn (such as for output addresses) are fine. */ - if (HAVE_cc0 && no_input_reloads) - for (i = 0; i < n_reloads; i++) - gcc_assert (rld[i].in == 0 - || rld[i].when_needed == RELOAD_FOR_OUTADDR_ADDRESS - || rld[i].when_needed == RELOAD_FOR_OUTPUT_ADDRESS); - /* Compute reload_mode and reload_nregs. */ for (i = 0; i < n_reloads; i++) { @@ -5323,7 +5286,6 @@ subst_reg_equivs (rtx ad, rtx_insn *insn) case SYMBOL_REF: case LABEL_REF: case PC: - case CC0: return ad; case REG: @@ -5862,7 +5824,7 @@ find_reloads_address_1 (machine_mode mode, addr_space_t as, /* If we can output the register afterwards, do so, this saves the extra update. We can do so if we have an INSN - i.e. no JUMP_INSN nor - CALL_INSN - and it does not set CC0. + CALL_INSN. But don't do this if we cannot directly address the memory location, since this will make it harder to reuse address reloads, and increases register pressure. @@ -5872,9 +5834,6 @@ find_reloads_address_1 (machine_mode mode, addr_space_t as, : reg_equiv_mem (regno)); enum insn_code icode = optab_handler (add_optab, GET_MODE (x)); if (insn && NONJUMP_INSN_P (insn) -#if HAVE_cc0 - && ! sets_cc0_p (PATTERN (insn)) -#endif && (regno < FIRST_PSEUDO_REGISTER || (equiv && memory_operand (equiv, GET_MODE (equiv)) @@ -6621,8 +6580,7 @@ reg_overlap_mentioned_for_reload_p (rtx x, rtx in) } else if (MEM_P (x)) return refers_to_mem_for_reload_p (in); - else if (GET_CODE (x) == SCRATCH || GET_CODE (x) == PC - || GET_CODE (x) == CC0) + else if (GET_CODE (x) == SCRATCH || GET_CODE (x) == PC) return reg_mentioned_p (x, in); else { |