From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by sourceware.org (Postfix) with ESMTPS id 4A8633858421 for ; Tue, 28 Mar 2023 13:29:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4A8633858421 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=axis.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1680010172; x=1711546172; h=from:to:cc:in-reply-to:subject:mime-version: content-transfer-encoding:references:message-id:date; bh=K20T6i4hNg4pGdClfYFxvd5agTeA8vFajumeentDpFg=; b=lGpTVTZYacDCF8bcIudvR9oQ3IyZcExOh0xnBuRldxQiIp3+Cz6SCCLZ dL/XBR0TrtDtCdWES8oJFuGSPsi8pGjeYMNd0HyRAVR+ivXgUAS0rjTa9 awjIwnjnqOxP9jm3/I1H+jjXUA2whexspwUN5dvBXAuVszSUzs/Iy7xrM SWEYeKQ9xzR3mFhhg5PksImU137SWewpotjtxfPzilBtbN6urV6A+Cve6 ogI7R3QqYfmxz1pz0RDfRYDftA76SRui83bi454QoOJe9ZL7gGDpx/rjC ITVmlXQ07r4aVwfeXEFvi2L4LWQprAoO3gFmlTXCCtLsqK573lGWZBo9G g==; From: Hans-Peter Nilsson To: CC: In-Reply-To: <20230314160443.AC7E420417@pchp3.se.axis.com> (message from Hans-Peter Nilsson on Tue, 14 Mar 2023 17:04:43 +0100) Subject: Ping #2: [PATCH v2] doc: md.texi (Insn Splitting): Tweak wording for readability. MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT References: <20230314012536.2789120417@pchp3.se.axis.com> <20230314160443.AC7E420417@pchp3.se.axis.com> Message-ID: <20230328132929.EB364203AC@pchp3.se.axis.com> Date: Tue, 28 Mar 2023 15:29:29 +0200 X-Spam-Status: No, score=-8.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,MEDICAL_SUBJECT,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: > From: Hans-Peter Nilsson > Date: Tue, 14 Mar 2023 17:04:43 +0100 Ping #2 on contents (formatting is approved): > -- >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. > > Co-Authored-By: Sandra Loosemore > --- > 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..134b227b9a93 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 after the splitter > +runs, several restrictions apply. > + > +Splitting of a jump instruction into a sequence that has another jump > +instruction to the same label is always valid, as the compiler expects > +identical behavior of the new jump. When the new sequence contains multiple > +jump instructions or new labels, more assistance is needed. The splitter is > +permitted 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 permitted to have only forward jumps to the newly-created labels. > > @findex define_insn_and_split > For the common case where the pattern of a define_split exactly matches the > -- > 2.30.2 > > brgds, H-P >