[gcc(refs/users/segher/heads/cc0)] get rid of CC_STATUS
Segher Boessenkool
segher@gcc.gnu.org
Mon Jun 15 19:24:02 GMT 2020
https://gcc.gnu.org/g:fe40cd6c6007008c99c79eca34f90b09b2186cff
commit fe40cd6c6007008c99c79eca34f90b09b2186cff
Author: Segher Boessenkool <segher@kernel.crashing.org>
Date: Sun Sep 22 20:44:16 2019 +0000
get rid of CC_STATUS
Diff:
---
gcc/conditions.h | 36 ------------------------------------
gcc/doc/md.texi | 11 ++---------
gcc/doc/tm.texi | 15 ---------------
gcc/doc/tm.texi.in | 15 ---------------
gcc/final.c | 11 -----------
gcc/reg-notes.def | 4 ++--
gcc/system.h | 2 +-
7 files changed, 5 insertions(+), 89 deletions(-)
diff --git a/gcc/conditions.h b/gcc/conditions.h
index 8a74ba9f97b..15ebe30371f 100644
--- a/gcc/conditions.h
+++ b/gcc/conditions.h
@@ -20,34 +20,6 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_CONDITIONS_H
#define GCC_CONDITIONS_H
-/* The variable cc_status says how to interpret the condition code.
- It is set by output routines for an instruction that sets the cc's
- and examined by output routines for jump instructions.
-
- cc_status contains two components named `value1' and `value2'
- that record two equivalent expressions for the values that the
- condition codes were set from. (Either or both may be null if
- there is no useful expression to record.) These fields are
- used for eliminating redundant test and compare instructions
- in the cases where the condition codes were already set by the
- previous instruction.
-
- cc_status.flags contains flags which say that the condition codes
- were set in a nonstandard manner. The output of jump instructions
- uses these flags to compensate and produce the standard result
- with the nonstandard condition codes. Standard flags are defined here.
- The tm.h file can also define other machine-dependent flags. */
-
-struct CC_STATUS {int flags; rtx value1, value2;};
-
-/* While outputting an insn as assembler code,
- this is the status BEFORE that insn. */
-extern CC_STATUS cc_prev_status;
-
-/* While outputting an insn as assembler code,
- this is being altered to the status AFTER that insn. */
-extern CC_STATUS cc_status;
-
/* These are the machine-independent flags: */
/* Set if the sign of the cc value is inverted:
@@ -94,12 +66,4 @@ extern CC_STATUS cc_status;
This is only used by machine description files. */
#define CC_NOT_SIGNED 0200
-/* This is how to initialize the variable cc_status.
- final does this at appropriate moments. */
-
-/* FIXME: We want to get rid of these ifndefs. */
-#ifndef CC_STATUS_INIT
-#define CC_STATUS_INIT \
- (cc_status.flags = 0, cc_status.value1 = 0, cc_status.value2 = 0)
-#endif
#endif /* GCC_CONDITIONS_H */
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index 5d0f4868584..fcc3c68048a 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -7733,15 +7733,8 @@ works better when different sets of comparison operators are supported
by different kinds of conditional branches (e.g.@: integer vs.@:
floating-point), or by conditional branches with respect to conditional stores.
-Two separate insns are always used if the machine description represents
-a condition code register using the legacy RTL expression @code{(cc0)},
-and on most machines that use a separate condition code register
-(@pxref{Condition Code}). For machines that use @code{(cc0)}, in
-fact, the set and use of the condition code must be separate and
-adjacent@footnote{@code{note} insns can separate them, though.}, thus
-allowing flags in @code{cc_status} to be used (@pxref{Condition Code}) and
-so that the comparison and branch insns could be located from each other
-by using the functions @code{prev_cc0_setter} and @code{next_cc0_user}.
+Two separate insns are always used on most machines that use a separate
+condition code register (@pxref{Condition Code}).
Even in this case having a single entry point for conditional branches
is advantageous, because it handles equally well the case where a single
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 1be6a6aa472..23aa9ad7963 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -6318,24 +6318,9 @@ specified already in the compare instruction. In this case, you are not
interested in most macros in this section.
@menu
-* CC0 Condition Codes:: Old style representation of condition codes.
* MODE_CC Condition Codes:: Modern representation of condition codes.
@end menu
-@node CC0 Condition Codes
-@subsection Representation of condition codes using @code{(cc0)}
-@findex cc0
-
-@findex cc_status
-The file @file{conditions.h} defines a variable @code{cc_status} to
-describe how the condition code was computed (in case the interpretation of
-the condition code depends on the instruction that it was set by). This
-variable contains the RTL expressions on which the condition code is
-currently based, and several standard flags.
-
-Sometimes additional machine-specific flags must be defined in the machine
-description header file.
-
@node MODE_CC Condition Codes
@subsection Representation of condition codes using registers
@findex CCmode
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index c0a79cf1a36..5f684abfabc 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -4300,24 +4300,9 @@ specified already in the compare instruction. In this case, you are not
interested in most macros in this section.
@menu
-* CC0 Condition Codes:: Old style representation of condition codes.
* MODE_CC Condition Codes:: Modern representation of condition codes.
@end menu
-@node CC0 Condition Codes
-@subsection Representation of condition codes using @code{(cc0)}
-@findex cc0
-
-@findex cc_status
-The file @file{conditions.h} defines a variable @code{cc_status} to
-describe how the condition code was computed (in case the interpretation of
-the condition code depends on the instruction that it was set by). This
-variable contains the RTL expressions on which the condition code is
-currently based, and several standard flags.
-
-Sometimes additional machine-specific flags must be defined in the machine
-description header file.
-
@node MODE_CC Condition Codes
@subsection Representation of condition codes using registers
@findex CCmode
diff --git a/gcc/final.c b/gcc/final.c
index a1197663b96..26efc68c3f4 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -174,17 +174,6 @@ static rtx last_ignored_compare = 0;
static int insn_counter = 0;
-/* This variable contains machine-dependent flags (defined in tm.h)
- set and examined by output routines
- that describe how to interpret the condition codes properly. */
-
-CC_STATUS cc_status;
-
-/* During output of an insn, this contains a copy of cc_status
- from before the insn. */
-
-CC_STATUS cc_prev_status;
-
/* Number of unmatched NOTE_INSN_BLOCK_BEG notes we have seen. */
static int block_depth;
diff --git a/gcc/reg-notes.def b/gcc/reg-notes.def
index 946d1357d5b..a0f1bd3db71 100644
--- a/gcc/reg-notes.def
+++ b/gcc/reg-notes.def
@@ -76,8 +76,8 @@ REG_NOTE (UNUSED)
insns, but we permit putting a cc0-setting insn in the delay slot
of a branch as long as only one copy of the insn exists. In that
case, these notes point from one to the other to allow code
- generation to determine what any require information and to
- properly update CC_STATUS. These notes are INSN_LISTs. */
+ generation to determine what any require information. These notes
+ are INSN_LISTs. */
REG_NOTE (CC_SETTER)
REG_NOTE (CC_USER)
diff --git a/gcc/system.h b/gcc/system.h
index d4661dd8b48..e9735af9200 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -937,7 +937,7 @@ extern void fancy_abort (const char *, int, const char *)
SECONDARY_MEMORY_NEEDED CANNOT_CHANGE_MODE_CLASS \
TRULY_NOOP_TRUNCATION FUNCTION_ARG_OFFSET CONSTANT_ALIGNMENT \
STARTING_FRAME_OFFSET NOTICE_UPDATE_CC CC_STATUS_MDEP_INIT \
- CC_STATUS_MDEP
+ CC_STATUS_MDEP CC_STATUS
/* Target macros only used for code built for the target, that have
moved to libgcc-tm.h or have never been present elsewhere. */
More information about the Gcc-cvs
mailing list