public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/segher/heads/cc0)] get rid of NOTICE_UPDATE_CC
@ 2020-06-15 19:23 Segher Boessenkool
0 siblings, 0 replies; 4+ messages in thread
From: Segher Boessenkool @ 2020-06-15 19:23 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:247725db2a619a24cf8c05632fdc74c7acbd0166
commit 247725db2a619a24cf8c05632fdc74c7acbd0166
Author: Segher Boessenkool <segher@kernel.crashing.org>
Date: Sun Sep 22 17:22:58 2019 +0000
get rid of NOTICE_UPDATE_CC
Diff:
---
gcc/compare-elim.c | 4 +---
gcc/doc/md.texi | 3 +--
gcc/doc/rtl.texi | 11 -----------
gcc/doc/tm.texi | 37 -------------------------------------
gcc/doc/tm.texi.in | 37 -------------------------------------
gcc/system.h | 2 +-
6 files changed, 3 insertions(+), 91 deletions(-)
diff --git a/gcc/compare-elim.c b/gcc/compare-elim.c
index 85f3e344074..edb3018ba86 100644
--- a/gcc/compare-elim.c
+++ b/gcc/compare-elim.c
@@ -25,9 +25,7 @@ along with GCC; see the file COPYING3. If not see
cannot make use of the comparison elimination offered by the combine pass.
This is a small pass intended to provide comparison elimination similar to
- what is available via NOTICE_UPDATE_CC for cc0 targets. This should help
- encourage cc0 targets to convert to an explicit post-reload representation
- of the flags.
+ what was available via NOTICE_UPDATE_CC for cc0 targets.
This pass assumes:
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index 2c67c818da5..5d0f4868584 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -9074,8 +9074,7 @@ In addition to describing the instruction supported by the target machine,
the @file{md} file also defines a group of @dfn{attributes} and a set of
values for each. Every generated insn is assigned a value for each attribute.
One possible attribute would be the effect that the insn has on the machine's
-condition code. This attribute can then be used by @code{NOTICE_UPDATE_CC}
-to track the condition codes.
+condition code.
@menu
* Defining Attributes:: Specifying attributes and their values.
diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi
index 501fa1a31da..2570cd34281 100644
--- a/gcc/doc/rtl.texi
+++ b/gcc/doc/rtl.texi
@@ -2325,15 +2325,6 @@ There is only one expression object of code @code{cc0}; it is the
value of the variable @code{cc0_rtx}. Any attempt to create an
expression of code @code{cc0} will return @code{cc0_rtx}.
-Instructions can set the condition code implicitly. On many machines,
-nearly all instructions set the condition code based on the value that
-they compute or store. It is not necessary to record these actions
-explicitly in the RTL because the machine description includes a
-prescription for recognizing the instructions that do so (by means of
-the macro @code{NOTICE_UPDATE_CC}). @xref{Condition Code}. Only
-instructions whose sole purpose is to set the condition code, and
-instructions that use the condition code, need mention @code{(cc0)}.
-
On some machines, the condition code register is given a register number
and a @code{reg} is used instead of @code{(cc0)}. This is usually the
preferable approach if only a small subset of instructions modify the
@@ -3390,8 +3381,6 @@ whose elements are the operands needed to output the resulting
assembler code---often @code{reg}, @code{mem} or constant expressions.
This would not be well-formed RTL at any other stage in compilation,
but it is OK then because no further optimization remains to be done.
-However, the definition of the macro @code{NOTICE_UPDATE_CC}, if
-any, must deal with such insns if you define any peephole optimizations.
@findex cond_exec
@item (cond_exec [@var{cond} @var{expr}])
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 6e7d9dc54a9..fdc75c78429 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -6353,43 +6353,6 @@ define this macro to initialize it.
This macro is not used on machines that do not use @code{cc0}.
@end defmac
-@defmac NOTICE_UPDATE_CC (@var{exp}, @var{insn})
-A C compound statement to set the components of @code{cc_status}
-appropriately for an insn @var{insn} whose body is @var{exp}. It is
-this macro's responsibility to recognize insns that set the condition
-code as a byproduct of other activity as well as those that explicitly
-set @code{(cc0)}.
-
-This macro is not used on machines that do not use @code{cc0}.
-
-If there are insns that do not set the condition code but do alter
-other machine registers, this macro must check to see whether they
-invalidate the expressions that the condition code is recorded as
-reflecting. For example, on the 68000, insns that store in address
-registers do not set the condition code, which means that usually
-@code{NOTICE_UPDATE_CC} can leave @code{cc_status} unaltered for such
-insns. But suppose that the previous insn set the condition code
-based on location @samp{a4@@(102)} and the current insn stores a new
-value in @samp{a4}. Although the condition code is not changed by
-this, it will no longer be true that it reflects the contents of
-@samp{a4@@(102)}. Therefore, @code{NOTICE_UPDATE_CC} must alter
-@code{cc_status} in this case to say that nothing is known about the
-condition code value.
-
-The definition of @code{NOTICE_UPDATE_CC} must be prepared to deal
-with the results of peephole optimization: insns whose patterns are
-@code{parallel} RTXs containing various @code{reg}, @code{mem} or
-constants which are just the operands. The RTL structure of these
-insns is not sufficient to indicate what the insns actually do. What
-@code{NOTICE_UPDATE_CC} should do when it sees one is just to run
-@code{CC_STATUS_INIT}.
-
-A possible definition of @code{NOTICE_UPDATE_CC} is to call a function
-that looks at an attribute (@pxref{Insn Attributes}) named, for example,
-@samp{cc}. This avoids having detailed information about patterns in
-two places, the @file{md} file and in @code{NOTICE_UPDATE_CC}.
-@end defmac
-
@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 3be984bbd5c..85159c92242 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -4335,43 +4335,6 @@ define this macro to initialize it.
This macro is not used on machines that do not use @code{cc0}.
@end defmac
-@defmac NOTICE_UPDATE_CC (@var{exp}, @var{insn})
-A C compound statement to set the components of @code{cc_status}
-appropriately for an insn @var{insn} whose body is @var{exp}. It is
-this macro's responsibility to recognize insns that set the condition
-code as a byproduct of other activity as well as those that explicitly
-set @code{(cc0)}.
-
-This macro is not used on machines that do not use @code{cc0}.
-
-If there are insns that do not set the condition code but do alter
-other machine registers, this macro must check to see whether they
-invalidate the expressions that the condition code is recorded as
-reflecting. For example, on the 68000, insns that store in address
-registers do not set the condition code, which means that usually
-@code{NOTICE_UPDATE_CC} can leave @code{cc_status} unaltered for such
-insns. But suppose that the previous insn set the condition code
-based on location @samp{a4@@(102)} and the current insn stores a new
-value in @samp{a4}. Although the condition code is not changed by
-this, it will no longer be true that it reflects the contents of
-@samp{a4@@(102)}. Therefore, @code{NOTICE_UPDATE_CC} must alter
-@code{cc_status} in this case to say that nothing is known about the
-condition code value.
-
-The definition of @code{NOTICE_UPDATE_CC} must be prepared to deal
-with the results of peephole optimization: insns whose patterns are
-@code{parallel} RTXs containing various @code{reg}, @code{mem} or
-constants which are just the operands. The RTL structure of these
-insns is not sufficient to indicate what the insns actually do. What
-@code{NOTICE_UPDATE_CC} should do when it sees one is just to run
-@code{CC_STATUS_INIT}.
-
-A possible definition of @code{NOTICE_UPDATE_CC} is to call a function
-that looks at an attribute (@pxref{Insn Attributes}) named, for example,
-@samp{cc}. This avoids having detailed information about patterns in
-two places, the @file{md} file and in @code{NOTICE_UPDATE_CC}.
-@end defmac
-
@node MODE_CC Condition Codes
@subsection Representation of condition codes using registers
@findex CCmode
diff --git a/gcc/system.h b/gcc/system.h
index 544f7ba427f..50dbdcfd5d9 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -936,7 +936,7 @@ extern void fancy_abort (const char *, int, const char *)
HARD_REGNO_NREGS SECONDARY_MEMORY_NEEDED_MODE \
SECONDARY_MEMORY_NEEDED CANNOT_CHANGE_MODE_CLASS \
TRULY_NOOP_TRUNCATION FUNCTION_ARG_OFFSET CONSTANT_ALIGNMENT \
- STARTING_FRAME_OFFSET
+ STARTING_FRAME_OFFSET NOTICE_UPDATE_CC
/* Target macros only used for code built for the target, that have
moved to libgcc-tm.h or have never been present elsewhere. */
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gcc(refs/users/segher/heads/cc0)] get rid of NOTICE_UPDATE_CC
@ 2020-12-15 17:04 Segher Boessenkool
0 siblings, 0 replies; 4+ messages in thread
From: Segher Boessenkool @ 2020-12-15 17:04 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:68278e90788c42055c85069c815f05c8f5457285
commit 68278e90788c42055c85069c815f05c8f5457285
Author: Segher Boessenkool <segher@kernel.crashing.org>
Date: Sun Sep 22 17:22:58 2019 +0000
get rid of NOTICE_UPDATE_CC
Diff:
---
gcc/compare-elim.c | 4 +---
gcc/doc/md.texi | 3 +--
gcc/doc/rtl.texi | 11 -----------
gcc/doc/tm.texi | 37 -------------------------------------
gcc/doc/tm.texi.in | 37 -------------------------------------
gcc/system.h | 2 +-
6 files changed, 3 insertions(+), 91 deletions(-)
diff --git a/gcc/compare-elim.c b/gcc/compare-elim.c
index 85f3e344074..edb3018ba86 100644
--- a/gcc/compare-elim.c
+++ b/gcc/compare-elim.c
@@ -25,9 +25,7 @@ along with GCC; see the file COPYING3. If not see
cannot make use of the comparison elimination offered by the combine pass.
This is a small pass intended to provide comparison elimination similar to
- what is available via NOTICE_UPDATE_CC for cc0 targets. This should help
- encourage cc0 targets to convert to an explicit post-reload representation
- of the flags.
+ what was available via NOTICE_UPDATE_CC for cc0 targets.
This pass assumes:
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index ec6ec180b91..89a63fae447 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -9170,8 +9170,7 @@ In addition to describing the instruction supported by the target machine,
the @file{md} file also defines a group of @dfn{attributes} and a set of
values for each. Every generated insn is assigned a value for each attribute.
One possible attribute would be the effect that the insn has on the machine's
-condition code. This attribute can then be used by @code{NOTICE_UPDATE_CC}
-to track the condition codes.
+condition code.
@menu
* Defining Attributes:: Specifying attributes and their values.
diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi
index 7c12991e54d..868265c0d7e 100644
--- a/gcc/doc/rtl.texi
+++ b/gcc/doc/rtl.texi
@@ -2355,15 +2355,6 @@ There is only one expression object of code @code{cc0}; it is the
value of the variable @code{cc0_rtx}. Any attempt to create an
expression of code @code{cc0} will return @code{cc0_rtx}.
-Instructions can set the condition code implicitly. On many machines,
-nearly all instructions set the condition code based on the value that
-they compute or store. It is not necessary to record these actions
-explicitly in the RTL because the machine description includes a
-prescription for recognizing the instructions that do so (by means of
-the macro @code{NOTICE_UPDATE_CC}). @xref{Condition Code}. Only
-instructions whose sole purpose is to set the condition code, and
-instructions that use the condition code, need mention @code{(cc0)}.
-
On some machines, the condition code register is given a register number
and a @code{reg} is used instead of @code{(cc0)}. This is usually the
preferable approach if only a small subset of instructions modify the
@@ -3420,8 +3411,6 @@ whose elements are the operands needed to output the resulting
assembler code---often @code{reg}, @code{mem} or constant expressions.
This would not be well-formed RTL at any other stage in compilation,
but it is OK then because no further optimization remains to be done.
-However, the definition of the macro @code{NOTICE_UPDATE_CC}, if
-any, must deal with such insns if you define any peephole optimizations.
@findex cond_exec
@item (cond_exec [@var{cond} @var{expr}])
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index d9b855c13ac..36eef4d4e53 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -6374,43 +6374,6 @@ define this macro to initialize it.
This macro is not used on machines that do not use @code{cc0}.
@end defmac
-@defmac NOTICE_UPDATE_CC (@var{exp}, @var{insn})
-A C compound statement to set the components of @code{cc_status}
-appropriately for an insn @var{insn} whose body is @var{exp}. It is
-this macro's responsibility to recognize insns that set the condition
-code as a byproduct of other activity as well as those that explicitly
-set @code{(cc0)}.
-
-This macro is not used on machines that do not use @code{cc0}.
-
-If there are insns that do not set the condition code but do alter
-other machine registers, this macro must check to see whether they
-invalidate the expressions that the condition code is recorded as
-reflecting. For example, on the 68000, insns that store in address
-registers do not set the condition code, which means that usually
-@code{NOTICE_UPDATE_CC} can leave @code{cc_status} unaltered for such
-insns. But suppose that the previous insn set the condition code
-based on location @samp{a4@@(102)} and the current insn stores a new
-value in @samp{a4}. Although the condition code is not changed by
-this, it will no longer be true that it reflects the contents of
-@samp{a4@@(102)}. Therefore, @code{NOTICE_UPDATE_CC} must alter
-@code{cc_status} in this case to say that nothing is known about the
-condition code value.
-
-The definition of @code{NOTICE_UPDATE_CC} must be prepared to deal
-with the results of peephole optimization: insns whose patterns are
-@code{parallel} RTXs containing various @code{reg}, @code{mem} or
-constants which are just the operands. The RTL structure of these
-insns is not sufficient to indicate what the insns actually do. What
-@code{NOTICE_UPDATE_CC} should do when it sees one is just to run
-@code{CC_STATUS_INIT}.
-
-A possible definition of @code{NOTICE_UPDATE_CC} is to call a function
-that looks at an attribute (@pxref{Insn Attributes}) named, for example,
-@samp{cc}. This avoids having detailed information about patterns in
-two places, the @file{md} file and in @code{NOTICE_UPDATE_CC}.
-@end defmac
-
@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 ad568581fd4..67f6acd8712 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -4339,43 +4339,6 @@ define this macro to initialize it.
This macro is not used on machines that do not use @code{cc0}.
@end defmac
-@defmac NOTICE_UPDATE_CC (@var{exp}, @var{insn})
-A C compound statement to set the components of @code{cc_status}
-appropriately for an insn @var{insn} whose body is @var{exp}. It is
-this macro's responsibility to recognize insns that set the condition
-code as a byproduct of other activity as well as those that explicitly
-set @code{(cc0)}.
-
-This macro is not used on machines that do not use @code{cc0}.
-
-If there are insns that do not set the condition code but do alter
-other machine registers, this macro must check to see whether they
-invalidate the expressions that the condition code is recorded as
-reflecting. For example, on the 68000, insns that store in address
-registers do not set the condition code, which means that usually
-@code{NOTICE_UPDATE_CC} can leave @code{cc_status} unaltered for such
-insns. But suppose that the previous insn set the condition code
-based on location @samp{a4@@(102)} and the current insn stores a new
-value in @samp{a4}. Although the condition code is not changed by
-this, it will no longer be true that it reflects the contents of
-@samp{a4@@(102)}. Therefore, @code{NOTICE_UPDATE_CC} must alter
-@code{cc_status} in this case to say that nothing is known about the
-condition code value.
-
-The definition of @code{NOTICE_UPDATE_CC} must be prepared to deal
-with the results of peephole optimization: insns whose patterns are
-@code{parallel} RTXs containing various @code{reg}, @code{mem} or
-constants which are just the operands. The RTL structure of these
-insns is not sufficient to indicate what the insns actually do. What
-@code{NOTICE_UPDATE_CC} should do when it sees one is just to run
-@code{CC_STATUS_INIT}.
-
-A possible definition of @code{NOTICE_UPDATE_CC} is to call a function
-that looks at an attribute (@pxref{Insn Attributes}) named, for example,
-@samp{cc}. This avoids having detailed information about patterns in
-two places, the @file{md} file and in @code{NOTICE_UPDATE_CC}.
-@end defmac
-
@node MODE_CC Condition Codes
@subsection Representation of condition codes using registers
@findex CCmode
diff --git a/gcc/system.h b/gcc/system.h
index 6f6ab616a61..88939a109b8 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -962,7 +962,7 @@ extern void fancy_abort (const char *, int, const char *)
HARD_REGNO_NREGS SECONDARY_MEMORY_NEEDED_MODE \
SECONDARY_MEMORY_NEEDED CANNOT_CHANGE_MODE_CLASS \
TRULY_NOOP_TRUNCATION FUNCTION_ARG_OFFSET CONSTANT_ALIGNMENT \
- STARTING_FRAME_OFFSET
+ STARTING_FRAME_OFFSET NOTICE_UPDATE_CC
/* Target macros only used for code built for the target, that have
moved to libgcc-tm.h or have never been present elsewhere. */
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gcc(refs/users/segher/heads/cc0)] get rid of NOTICE_UPDATE_CC
@ 2020-12-15 15:51 Segher Boessenkool
0 siblings, 0 replies; 4+ messages in thread
From: Segher Boessenkool @ 2020-12-15 15:51 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:ce144ef05224850864df9b2dc3ff37508b689905
commit ce144ef05224850864df9b2dc3ff37508b689905
Author: Segher Boessenkool <segher@kernel.crashing.org>
Date: Sun Sep 22 17:22:58 2019 +0000
get rid of NOTICE_UPDATE_CC
Diff:
---
gcc/compare-elim.c | 4 +---
gcc/doc/md.texi | 3 +--
gcc/doc/rtl.texi | 11 -----------
gcc/doc/tm.texi | 37 -------------------------------------
gcc/doc/tm.texi.in | 37 -------------------------------------
gcc/system.h | 2 +-
6 files changed, 3 insertions(+), 91 deletions(-)
diff --git a/gcc/compare-elim.c b/gcc/compare-elim.c
index 85f3e344074..edb3018ba86 100644
--- a/gcc/compare-elim.c
+++ b/gcc/compare-elim.c
@@ -25,9 +25,7 @@ along with GCC; see the file COPYING3. If not see
cannot make use of the comparison elimination offered by the combine pass.
This is a small pass intended to provide comparison elimination similar to
- what is available via NOTICE_UPDATE_CC for cc0 targets. This should help
- encourage cc0 targets to convert to an explicit post-reload representation
- of the flags.
+ what was available via NOTICE_UPDATE_CC for cc0 targets.
This pass assumes:
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index 573a340c14b..6cea1405491 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -9122,8 +9122,7 @@ In addition to describing the instruction supported by the target machine,
the @file{md} file also defines a group of @dfn{attributes} and a set of
values for each. Every generated insn is assigned a value for each attribute.
One possible attribute would be the effect that the insn has on the machine's
-condition code. This attribute can then be used by @code{NOTICE_UPDATE_CC}
-to track the condition codes.
+condition code.
@menu
* Defining Attributes:: Specifying attributes and their values.
diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi
index 7c12991e54d..868265c0d7e 100644
--- a/gcc/doc/rtl.texi
+++ b/gcc/doc/rtl.texi
@@ -2355,15 +2355,6 @@ There is only one expression object of code @code{cc0}; it is the
value of the variable @code{cc0_rtx}. Any attempt to create an
expression of code @code{cc0} will return @code{cc0_rtx}.
-Instructions can set the condition code implicitly. On many machines,
-nearly all instructions set the condition code based on the value that
-they compute or store. It is not necessary to record these actions
-explicitly in the RTL because the machine description includes a
-prescription for recognizing the instructions that do so (by means of
-the macro @code{NOTICE_UPDATE_CC}). @xref{Condition Code}. Only
-instructions whose sole purpose is to set the condition code, and
-instructions that use the condition code, need mention @code{(cc0)}.
-
On some machines, the condition code register is given a register number
and a @code{reg} is used instead of @code{(cc0)}. This is usually the
preferable approach if only a small subset of instructions modify the
@@ -3420,8 +3411,6 @@ whose elements are the operands needed to output the resulting
assembler code---often @code{reg}, @code{mem} or constant expressions.
This would not be well-formed RTL at any other stage in compilation,
but it is OK then because no further optimization remains to be done.
-However, the definition of the macro @code{NOTICE_UPDATE_CC}, if
-any, must deal with such insns if you define any peephole optimizations.
@findex cond_exec
@item (cond_exec [@var{cond} @var{expr}])
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index d9b855c13ac..36eef4d4e53 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -6374,43 +6374,6 @@ define this macro to initialize it.
This macro is not used on machines that do not use @code{cc0}.
@end defmac
-@defmac NOTICE_UPDATE_CC (@var{exp}, @var{insn})
-A C compound statement to set the components of @code{cc_status}
-appropriately for an insn @var{insn} whose body is @var{exp}. It is
-this macro's responsibility to recognize insns that set the condition
-code as a byproduct of other activity as well as those that explicitly
-set @code{(cc0)}.
-
-This macro is not used on machines that do not use @code{cc0}.
-
-If there are insns that do not set the condition code but do alter
-other machine registers, this macro must check to see whether they
-invalidate the expressions that the condition code is recorded as
-reflecting. For example, on the 68000, insns that store in address
-registers do not set the condition code, which means that usually
-@code{NOTICE_UPDATE_CC} can leave @code{cc_status} unaltered for such
-insns. But suppose that the previous insn set the condition code
-based on location @samp{a4@@(102)} and the current insn stores a new
-value in @samp{a4}. Although the condition code is not changed by
-this, it will no longer be true that it reflects the contents of
-@samp{a4@@(102)}. Therefore, @code{NOTICE_UPDATE_CC} must alter
-@code{cc_status} in this case to say that nothing is known about the
-condition code value.
-
-The definition of @code{NOTICE_UPDATE_CC} must be prepared to deal
-with the results of peephole optimization: insns whose patterns are
-@code{parallel} RTXs containing various @code{reg}, @code{mem} or
-constants which are just the operands. The RTL structure of these
-insns is not sufficient to indicate what the insns actually do. What
-@code{NOTICE_UPDATE_CC} should do when it sees one is just to run
-@code{CC_STATUS_INIT}.
-
-A possible definition of @code{NOTICE_UPDATE_CC} is to call a function
-that looks at an attribute (@pxref{Insn Attributes}) named, for example,
-@samp{cc}. This avoids having detailed information about patterns in
-two places, the @file{md} file and in @code{NOTICE_UPDATE_CC}.
-@end defmac
-
@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 ad568581fd4..67f6acd8712 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -4339,43 +4339,6 @@ define this macro to initialize it.
This macro is not used on machines that do not use @code{cc0}.
@end defmac
-@defmac NOTICE_UPDATE_CC (@var{exp}, @var{insn})
-A C compound statement to set the components of @code{cc_status}
-appropriately for an insn @var{insn} whose body is @var{exp}. It is
-this macro's responsibility to recognize insns that set the condition
-code as a byproduct of other activity as well as those that explicitly
-set @code{(cc0)}.
-
-This macro is not used on machines that do not use @code{cc0}.
-
-If there are insns that do not set the condition code but do alter
-other machine registers, this macro must check to see whether they
-invalidate the expressions that the condition code is recorded as
-reflecting. For example, on the 68000, insns that store in address
-registers do not set the condition code, which means that usually
-@code{NOTICE_UPDATE_CC} can leave @code{cc_status} unaltered for such
-insns. But suppose that the previous insn set the condition code
-based on location @samp{a4@@(102)} and the current insn stores a new
-value in @samp{a4}. Although the condition code is not changed by
-this, it will no longer be true that it reflects the contents of
-@samp{a4@@(102)}. Therefore, @code{NOTICE_UPDATE_CC} must alter
-@code{cc_status} in this case to say that nothing is known about the
-condition code value.
-
-The definition of @code{NOTICE_UPDATE_CC} must be prepared to deal
-with the results of peephole optimization: insns whose patterns are
-@code{parallel} RTXs containing various @code{reg}, @code{mem} or
-constants which are just the operands. The RTL structure of these
-insns is not sufficient to indicate what the insns actually do. What
-@code{NOTICE_UPDATE_CC} should do when it sees one is just to run
-@code{CC_STATUS_INIT}.
-
-A possible definition of @code{NOTICE_UPDATE_CC} is to call a function
-that looks at an attribute (@pxref{Insn Attributes}) named, for example,
-@samp{cc}. This avoids having detailed information about patterns in
-two places, the @file{md} file and in @code{NOTICE_UPDATE_CC}.
-@end defmac
-
@node MODE_CC Condition Codes
@subsection Representation of condition codes using registers
@findex CCmode
diff --git a/gcc/system.h b/gcc/system.h
index 6f6ab616a61..88939a109b8 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -962,7 +962,7 @@ extern void fancy_abort (const char *, int, const char *)
HARD_REGNO_NREGS SECONDARY_MEMORY_NEEDED_MODE \
SECONDARY_MEMORY_NEEDED CANNOT_CHANGE_MODE_CLASS \
TRULY_NOOP_TRUNCATION FUNCTION_ARG_OFFSET CONSTANT_ALIGNMENT \
- STARTING_FRAME_OFFSET
+ STARTING_FRAME_OFFSET NOTICE_UPDATE_CC
/* Target macros only used for code built for the target, that have
moved to libgcc-tm.h or have never been present elsewhere. */
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gcc(refs/users/segher/heads/cc0)] get rid of NOTICE_UPDATE_CC
@ 2020-02-04 21:55 Segher Boessenkool
0 siblings, 0 replies; 4+ messages in thread
From: Segher Boessenkool @ 2020-02-04 21:55 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b1109bf5cf929c47eae9bc6d2a09c44751dc6985
commit b1109bf5cf929c47eae9bc6d2a09c44751dc6985
Author: Segher Boessenkool <segher@kernel.crashing.org>
Date: Sun Sep 22 17:22:58 2019 +0000
get rid of NOTICE_UPDATE_CC
Diff:
---
gcc/compare-elim.c | 4 +---
gcc/doc/md.texi | 3 +--
gcc/doc/rtl.texi | 11 -----------
gcc/doc/tm.texi | 37 -------------------------------------
gcc/doc/tm.texi.in | 37 -------------------------------------
gcc/system.h | 2 +-
6 files changed, 3 insertions(+), 91 deletions(-)
diff --git a/gcc/compare-elim.c b/gcc/compare-elim.c
index 85f3e34..edb3018 100644
--- a/gcc/compare-elim.c
+++ b/gcc/compare-elim.c
@@ -25,9 +25,7 @@ along with GCC; see the file COPYING3. If not see
cannot make use of the comparison elimination offered by the combine pass.
This is a small pass intended to provide comparison elimination similar to
- what is available via NOTICE_UPDATE_CC for cc0 targets. This should help
- encourage cc0 targets to convert to an explicit post-reload representation
- of the flags.
+ what was available via NOTICE_UPDATE_CC for cc0 targets.
This pass assumes:
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index 288a3a3..56ccfb9 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -9074,8 +9074,7 @@ In addition to describing the instruction supported by the target machine,
the @file{md} file also defines a group of @dfn{attributes} and a set of
values for each. Every generated insn is assigned a value for each attribute.
One possible attribute would be the effect that the insn has on the machine's
-condition code. This attribute can then be used by @code{NOTICE_UPDATE_CC}
-to track the condition codes.
+condition code.
@menu
* Defining Attributes:: Specifying attributes and their values.
diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi
index 501fa1a..2570cd3 100644
--- a/gcc/doc/rtl.texi
+++ b/gcc/doc/rtl.texi
@@ -2325,15 +2325,6 @@ There is only one expression object of code @code{cc0}; it is the
value of the variable @code{cc0_rtx}. Any attempt to create an
expression of code @code{cc0} will return @code{cc0_rtx}.
-Instructions can set the condition code implicitly. On many machines,
-nearly all instructions set the condition code based on the value that
-they compute or store. It is not necessary to record these actions
-explicitly in the RTL because the machine description includes a
-prescription for recognizing the instructions that do so (by means of
-the macro @code{NOTICE_UPDATE_CC}). @xref{Condition Code}. Only
-instructions whose sole purpose is to set the condition code, and
-instructions that use the condition code, need mention @code{(cc0)}.
-
On some machines, the condition code register is given a register number
and a @code{reg} is used instead of @code{(cc0)}. This is usually the
preferable approach if only a small subset of instructions modify the
@@ -3390,8 +3381,6 @@ whose elements are the operands needed to output the resulting
assembler code---often @code{reg}, @code{mem} or constant expressions.
This would not be well-formed RTL at any other stage in compilation,
but it is OK then because no further optimization remains to be done.
-However, the definition of the macro @code{NOTICE_UPDATE_CC}, if
-any, must deal with such insns if you define any peephole optimizations.
@findex cond_exec
@item (cond_exec [@var{cond} @var{expr}])
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 19985ad..3e502d2 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -6353,43 +6353,6 @@ define this macro to initialize it.
This macro is not used on machines that do not use @code{cc0}.
@end defmac
-@defmac NOTICE_UPDATE_CC (@var{exp}, @var{insn})
-A C compound statement to set the components of @code{cc_status}
-appropriately for an insn @var{insn} whose body is @var{exp}. It is
-this macro's responsibility to recognize insns that set the condition
-code as a byproduct of other activity as well as those that explicitly
-set @code{(cc0)}.
-
-This macro is not used on machines that do not use @code{cc0}.
-
-If there are insns that do not set the condition code but do alter
-other machine registers, this macro must check to see whether they
-invalidate the expressions that the condition code is recorded as
-reflecting. For example, on the 68000, insns that store in address
-registers do not set the condition code, which means that usually
-@code{NOTICE_UPDATE_CC} can leave @code{cc_status} unaltered for such
-insns. But suppose that the previous insn set the condition code
-based on location @samp{a4@@(102)} and the current insn stores a new
-value in @samp{a4}. Although the condition code is not changed by
-this, it will no longer be true that it reflects the contents of
-@samp{a4@@(102)}. Therefore, @code{NOTICE_UPDATE_CC} must alter
-@code{cc_status} in this case to say that nothing is known about the
-condition code value.
-
-The definition of @code{NOTICE_UPDATE_CC} must be prepared to deal
-with the results of peephole optimization: insns whose patterns are
-@code{parallel} RTXs containing various @code{reg}, @code{mem} or
-constants which are just the operands. The RTL structure of these
-insns is not sufficient to indicate what the insns actually do. What
-@code{NOTICE_UPDATE_CC} should do when it sees one is just to run
-@code{CC_STATUS_INIT}.
-
-A possible definition of @code{NOTICE_UPDATE_CC} is to call a function
-that looks at an attribute (@pxref{Insn Attributes}) named, for example,
-@samp{cc}. This avoids having detailed information about patterns in
-two places, the @file{md} file and in @code{NOTICE_UPDATE_CC}.
-@end defmac
-
@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 1a16150..5ba17b2 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -4335,43 +4335,6 @@ define this macro to initialize it.
This macro is not used on machines that do not use @code{cc0}.
@end defmac
-@defmac NOTICE_UPDATE_CC (@var{exp}, @var{insn})
-A C compound statement to set the components of @code{cc_status}
-appropriately for an insn @var{insn} whose body is @var{exp}. It is
-this macro's responsibility to recognize insns that set the condition
-code as a byproduct of other activity as well as those that explicitly
-set @code{(cc0)}.
-
-This macro is not used on machines that do not use @code{cc0}.
-
-If there are insns that do not set the condition code but do alter
-other machine registers, this macro must check to see whether they
-invalidate the expressions that the condition code is recorded as
-reflecting. For example, on the 68000, insns that store in address
-registers do not set the condition code, which means that usually
-@code{NOTICE_UPDATE_CC} can leave @code{cc_status} unaltered for such
-insns. But suppose that the previous insn set the condition code
-based on location @samp{a4@@(102)} and the current insn stores a new
-value in @samp{a4}. Although the condition code is not changed by
-this, it will no longer be true that it reflects the contents of
-@samp{a4@@(102)}. Therefore, @code{NOTICE_UPDATE_CC} must alter
-@code{cc_status} in this case to say that nothing is known about the
-condition code value.
-
-The definition of @code{NOTICE_UPDATE_CC} must be prepared to deal
-with the results of peephole optimization: insns whose patterns are
-@code{parallel} RTXs containing various @code{reg}, @code{mem} or
-constants which are just the operands. The RTL structure of these
-insns is not sufficient to indicate what the insns actually do. What
-@code{NOTICE_UPDATE_CC} should do when it sees one is just to run
-@code{CC_STATUS_INIT}.
-
-A possible definition of @code{NOTICE_UPDATE_CC} is to call a function
-that looks at an attribute (@pxref{Insn Attributes}) named, for example,
-@samp{cc}. This avoids having detailed information about patterns in
-two places, the @file{md} file and in @code{NOTICE_UPDATE_CC}.
-@end defmac
-
@node MODE_CC Condition Codes
@subsection Representation of condition codes using registers
@findex CCmode
diff --git a/gcc/system.h b/gcc/system.h
index 544f7ba..50dbdcf 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -936,7 +936,7 @@ extern void fancy_abort (const char *, int, const char *)
HARD_REGNO_NREGS SECONDARY_MEMORY_NEEDED_MODE \
SECONDARY_MEMORY_NEEDED CANNOT_CHANGE_MODE_CLASS \
TRULY_NOOP_TRUNCATION FUNCTION_ARG_OFFSET CONSTANT_ALIGNMENT \
- STARTING_FRAME_OFFSET
+ STARTING_FRAME_OFFSET NOTICE_UPDATE_CC
/* Target macros only used for code built for the target, that have
moved to libgcc-tm.h or have never been present elsewhere. */
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-15 17:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15 19:23 [gcc(refs/users/segher/heads/cc0)] get rid of NOTICE_UPDATE_CC Segher Boessenkool
-- strict thread matches above, loose matches on Subject: below --
2020-12-15 17:04 Segher Boessenkool
2020-12-15 15:51 Segher Boessenkool
2020-02-04 21:55 Segher Boessenkool
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).