From patchwork Tue Mar 14 01:25:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 69222 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1502612wrd; Mon, 13 Mar 2023 18:26:27 -0700 (PDT) X-Google-Smtp-Source: AK7set/ka+fFguzXv92u8RWxi8O1TfC4cZyx+PV9664xI+7+baBz8Q9GP3j4IUzY70HKSALoiMBO X-Received: by 2002:a17:906:5dad:b0:878:79e6:4672 with SMTP id n13-20020a1709065dad00b0087879e64672mr729062ejv.42.1678757186982; Mon, 13 Mar 2023 18:26:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678757186; cv=none; d=google.com; s=arc-20160816; b=DlMpnkKYGvfMj5wpRTt7o2un7eMlW6e+3MJxgT0OE47CpXmEdE4JopeKBBuqGVFXOG M4rz87WPOoVQee2U3uOONEVGR6Tm0OHSYVmerzncCsqjV5Z3XYs3HkgCwMedTkymXwpJ 2JvBwt1G0F3Z3gJVCBcmYvVsEQPs18cnGCDuFOQyoia3AtfZI11APciuAFqAdTEOE6vn aLJqFC35BTR66/2LANS/0qZA0vttMxwigvZz0Yt/V3Thi2hlP/7769Jtmfu+okX4Mffy duWIiB1UCOS2tQVj4OiesGXNgFBiGzJcZme+EGUYQ9ohDuV09D28e5q+kwPDmIp8ck25 +99w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:date:message-id :content-transfer-encoding:mime-version:subject:to:dmarc-filter :delivered-to:dkim-signature:dkim-filter; bh=/G24/iSgninutqhYh8tuGJf2OjLr0zffELY4iHRl2cY=; b=fQa3stH8904K1M3fdW82anvDd5YgBmJMJRD6JlV2wIBpxRF/6sukc4JcoOx7CepQUa KYIaCsrNdNbuOKr0U+F6vT6czD/ghzZ0/hbc8zfmHKMATDs0jrENOvIrsMT0X48c6c9m GRYPdh702e/FADG3TmzXyPRC6xjSdvrdoUfuswdTSU39ZRXKLdFMO14YdAaAVGCpCPQE PL0xk7ZpMfeWy7aHHBxkdvyiPyivDGl7J+r3vRzlN/4Zb+MiXd8vtvmblF2k2VhWJmkh DqTEEL2z2yjk94FMkXZVD2Bz65yed9QdykOkIgQBraaLlbPBUnmxniPGreMKs3EdyC+y c2eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=jUHps6VM; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ha25-20020a170906a89900b008d6b51de6bcsi1203170ejb.32.2023.03.13.18.26.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 18:26:26 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=jUHps6VM; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BC8423858C2D for ; Tue, 14 Mar 2023 01:26:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BC8423858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678757185; bh=/G24/iSgninutqhYh8tuGJf2OjLr0zffELY4iHRl2cY=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=jUHps6VMU6FwniFwcr5awggq52TcGed3ehbEcDcI7fOt9GgtftmVD0DTYvdyfiFY9 q9ucHv2nLtY1gTut2Ra/FQOpTSyltsRFA0ZDn057lAmtmDFEjDvuV9vBfbfBoBwe3R PjxxlUQZ8FjS1oHn5hDDb1Nru/nYbeziiw29b+Tw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by sourceware.org (Postfix) with ESMTPS id 5F2303858D32 for ; Tue, 14 Mar 2023 01:25:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5F2303858D32 To: , Subject: [PATCH] doc: md.texi (Insn Splitting): Tweak wording for readability. MIME-Version: 1.0 Message-ID: <20230314012536.2789120417@pchp3.se.axis.com> Date: Tue, 14 Mar 2023 02:25:36 +0100 X-Spam-Status: No, score=-8.6 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Hans-Peter Nilsson via Gcc-patches From: Hans-Peter Nilsson Reply-To: Hans-Peter Nilsson Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760304495914318871?= X-GMAIL-MSGID: =?utf-8?q?1760304495914318871?= 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. --- 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. + +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. When the new sequence contains multiple jump instructions or new +labels, more assistance is needed. The 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. @findex define_insn_and_split For the common case where the pattern of a define_split exactly matches the