From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1383) id BB77A3858D35; Mon, 15 Jun 2020 19:23:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BB77A3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592249026; bh=KBhJ3XPTKCJ0hqm40olBt+kySujZYRvCcqoJw51UQ5U=; h=From:To:Subject:Date:From; b=X4eJg/irNvlfNO6ruevlxChJMsZ9qf6/5isSEhm5wHKPAazqX4yQUtt22lpvJVY9L X90VKRhxjP4j8jFwxSzLBhHSD4EaJ3ywJ6ai3Rv341MaL3d/A2MIbPGCX/gu6yQrH9 rcBpP9xd6qZkHM8UgQopBnG4eh/gzWp8vDMkm84U= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Segher Boessenkool To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/segher/heads/cc0)] get rid of NOTICE_UPDATE_CC X-Act-Checkin: gcc X-Git-Author: Segher Boessenkool X-Git-Refname: refs/users/segher/heads/cc0 X-Git-Oldrev: 66c833e4562e5eaaa2df7e3c89c47095d0375439 X-Git-Newrev: 247725db2a619a24cf8c05632fdc74c7acbd0166 Message-Id: <20200615192346.BB77A3858D35@sourceware.org> Date: Mon, 15 Jun 2020 19:23:46 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2020 19:23:46 -0000 https://gcc.gnu.org/g:247725db2a619a24cf8c05632fdc74c7acbd0166 commit 247725db2a619a24cf8c05632fdc74c7acbd0166 Author: Segher Boessenkool 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. */