From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 1D7543858D32 for ; Tue, 14 Mar 2023 04:31:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1D7543858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.98,258,1673942400"; d="scan'208";a="100088461" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 13 Mar 2023 20:31:24 -0800 IronPort-SDR: 79pN3/oRadpnjK8vaSsDv4BpLNGbwUPmv4uz95D97GLFKLTZDcReMxF+oYNJvZFvs33xZR5Bqk y1mi3iiRdPhrflDZg3wAmQlZiHANWi91gEpdVuGLVxQ81OnIx1bY5fYWh6Vb3W9a3gFRI0PEFQ 4d+7D8BUSUWgWLZx6vyWvDMl2h9cDzsMbaS0MGmAOym92CSEuNyRoKhUlJwDsLLW9eAgmSiV4L iLECAmod97ljHZ5sgq3wa6b8Py9P4glSELvb6Yq0p5YnnzH8g3VV4z6k0TNZzVYlCQs7NWgxVE BeI= Message-ID: Date: Mon, 13 Mar 2023 22:31:21 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH] doc: md.texi (Insn Splitting): Tweak wording for readability. Content-Language: en-US To: Hans-Peter Nilsson , , References: <20230314012536.2789120417@pchp3.se.axis.com> From: Sandra Loosemore In-Reply-To: <20230314012536.2789120417@pchp3.se.axis.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-14.mgc.mentorg.com (147.34.90.214) To svr-orw-mbx-13.mgc.mentorg.com (147.34.90.213) X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,MEDICAL_SUBJECT,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 3/13/23 19:25, Hans-Peter Nilsson via Gcc-patches wrote: > Jan, did I get this right? This was from your > r0-36413-g6b24c25948265c / svn r44249, now on its 22nd year! > > I spot-checked the pdf for readability. Also calling on a > doc maintainer to check grammos etc. Ok to commit? > > -- >8 -- > I needed to check what was allowed in a define_split, but > had problems understanding what was meant by "Splitting of > jump instruction into sequence that over by another jump > instruction". > > * doc/md.texi (Insn Splitting): Tweak wording for readability. Thanks for noticing this! I can't comment on technical correctness, but I do have some further suggestions on wording below. > --- > gcc/doc/md.texi | 30 +++++++++++++++--------------- > 1 file changed, 15 insertions(+), 15 deletions(-) > > diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi > index 8e3113599fdc..786365143179 100644 > --- a/gcc/doc/md.texi > +++ b/gcc/doc/md.texi > @@ -8756,21 +8756,21 @@ insns that don't. Instead, write two separate @code{define_split} > definitions, one for the insns that are valid and one for the insns that > are not valid. > > -The splitter is allowed to split jump instructions into sequence of > -jumps or create new jumps in while splitting non-jump instructions. As > -the control flow graph and branch prediction information needs to be updated, > -several restriction apply. > - > -Splitting of jump instruction into sequence that over by another jump > -instruction is always valid, as compiler expect identical behavior of new > -jump. When new sequence contains multiple jump instructions or new labels, > -more assistance is needed. Splitter is required to create only unconditional > -jumps, or simple conditional jump instructions. Additionally it must attach a > -@code{REG_BR_PROB} note to each conditional jump. A global variable > -@code{split_branch_probability} holds the probability of the original branch in case > -it was a simple conditional jump, @minus{}1 otherwise. To simplify > -recomputing of edge frequencies, the new sequence is required to have only > -forward jumps to the newly created labels. > +The splitter is allowed to split jump instructions into a sequence of jumps or > +create new jumps while splitting non-jump instructions. As the control flow > +graph and branch prediction information needs to be updated, several > +restrictions apply. Maybe "needs to be updated after the splitter runs"? > + > +Splitting of a jump instruction into a sequence that has another jump > +instruction is always valid, as the compiler expects identical behavior of the > +new jump. Maybe "another jump instruction to the same label"? > When the new sequence contains multiple jump instructions or new > +labels, more assistance is needed. The splitter is required to create only s/required/permitted/ > +unconditional jumps, or simple conditional jump instructions. Additionally it > +must attach a @code{REG_BR_PROB} note to each conditional jump. A global > +variable @code{split_branch_probability} holds the probability of the original > +branch in case it was a simple conditional jump, @minus{}1 otherwise. To > +simplify recomputing of edge frequencies, the new sequence is required to have > +only forward jumps to the newly created labels. s/required/permitted/ again s/newly created/newly-created/ > > @findex define_insn_and_split > For the common case where the pattern of a define_split exactly matches the -Sandra