Message ID | 20230203102208.53215-1-guojiufu@linux.ibm.com |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp757703wrn; Fri, 3 Feb 2023 02:23:30 -0800 (PST) X-Google-Smtp-Source: AK7set9gvTTA7K6JwYqr6Mn/T6fNvrrc88lIyZuFjTxL7MJENTVJat6JgM56NxOJsQ8kHsbw1OGp X-Received: by 2002:a17:906:11c7:b0:887:3732:f584 with SMTP id o7-20020a17090611c700b008873732f584mr9329313eja.71.1675419810555; Fri, 03 Feb 2023 02:23:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675419810; cv=none; d=google.com; s=arc-20160816; b=WUAjtZAFTwgx+g+80nLe1pmumUBUAdxYPNRYP/ZsNu63RsQf1iS2V8SFQ7fbjZR/Mz h9nFoZEy+Sg4Lf7Ar9iv782WZc+v/AibxKBkLr0gz4XWAppkso4kKwWDL475hUJIttmF VWW8/23dvpK9bCtVysACW3AMFCOwpzR1nJtbzClcuK7gt4Z/x5HbTkFVVLyDgMxiKLu1 j5A8rPTpVlnAMJiNLRNjbVuRkdvr61x/RIZ/soah/64w1vlQF1UxijeJWC9mlCawP29E vW8M7iid5q438zNibAkH/0ZXCtqNSd0OVCDlfp7BF0IfxnYUbGGRFSRoasN00XZnT6Ev vpTw== 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:mime-version :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=rNUnyIRtrMm/Hyj+ieMCsGdYD6C/4RIFByDjvuc0hNo=; b=t2TsHQOmNrF6an8q+M28dBkG+RFgtBddrWr0rM64xbRPg9ezh03qvRjK21Xt96MgBU /pB0nr/s2muTXdnAWeXOwobWi/SKPPtXBBSVXWobZ/bNig8w3fGByy7Ye/tNtzhqojV7 +vKxqWdLF/3MpflSBBgsJEDruobO7Sa8MT0XFjfkmcPyhRdHBLQwHslKmK8Mytyxlgh+ 3kBvMa0uz+jtRzfoe/75yjFkRizZcmS1FnlWhahUgL2saAf5bvERh9PoGEXRnN1WjPP0 CCk5brm+xZtPSeam5b8cog2LU+Iuiz/sJiB4Zenyzyh2Bvnt4s58MONmk3AFI2rK6cdX QEqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ob7jDMzJ; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id um31-20020a170907cb1f00b0088b965692c3si2502010ejc.950.2023.02.03.02.23.30 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 02:23:30 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ob7jDMzJ; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 7111A3858C33 for <ouuuleilei@gmail.com>; Fri, 3 Feb 2023 10:23:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7111A3858C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675419782; bh=rNUnyIRtrMm/Hyj+ieMCsGdYD6C/4RIFByDjvuc0hNo=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=ob7jDMzJLHLwToSV2DuT4xzEH0h7ygK0VSKCSle/wFEJo7R20tPy7qUFuI7fOkpUG 3y+7o9gLlAzw04fJd17kF0FYabfbqAB3xq4It6I0AVWVxJqaGS/aJIsG5qgCATBwhe ZjiM1zTNvdbtQhGHos08ynOlSdDF4zKRAVj7BzwQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 090C53858D20; Fri, 3 Feb 2023 10:22:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 090C53858D20 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3138Ue98017517; Fri, 3 Feb 2023 10:22:15 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ngxtuad2m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Feb 2023 10:22:15 +0000 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3139kDqn016300; Fri, 3 Feb 2023 10:22:15 GMT Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ngxtuad21-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Feb 2023 10:22:15 +0000 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 312MMNNf019572; Fri, 3 Feb 2023 10:22:12 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma02fra.de.ibm.com (PPS) with ESMTPS id 3ncvv6d6r7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Feb 2023 10:22:12 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 313AMAWb25297320 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 3 Feb 2023 10:22:10 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0D9A62004B; Fri, 3 Feb 2023 10:22:10 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E82C020043; Fri, 3 Feb 2023 10:22:08 +0000 (GMT) Received: from pike.rch.stglabs.ibm.com (unknown [9.5.12.127]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 3 Feb 2023 10:22:08 +0000 (GMT) To: gcc-patches@gcc.gnu.org Cc: segher@kernel.crashing.org, dje.gcc@gmail.com, linkw@gcc.gnu.org, guojiufu@linux.ibm.com Subject: [PATCH 0/4] rs6000: build constant via li/lis;rldicX Date: Fri, 3 Feb 2023 18:22:04 +0800 Message-Id: <20230203102208.53215-1-guojiufu@linux.ibm.com> X-Mailer: git-send-email 2.17.1 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: GZe-2CPA4aD7sgQKbeqfVpES_AbpcNs3 X-Proofpoint-GUID: y5JPC4iFVHaAQyCbhxVZfgnYhITmYB5m X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-03_06,2023-02-03_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 impostorscore=0 phishscore=0 suspectscore=0 bulkscore=0 adultscore=0 malwarescore=0 mlxscore=0 mlxlogscore=612 priorityscore=1501 lowpriorityscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302030085 X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, KAM_SHORT, SPF_HELO_NONE, 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Jiufu Guo via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Jiufu Guo <guojiufu@linux.ibm.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756805003082908681?= X-GMAIL-MSGID: =?utf-8?q?1756805003082908681?= |
Series |
rs6000: build constant via li/lis;rldicX
|
|
Message
Jiufu Guo
Feb. 3, 2023, 10:22 a.m. UTC
Hi, For a given constant, it would be profitable if we can use 2 insns to build. This patch enables more constants building through 2 insns: one is "li or lis", another is 'rldicl, rldicr or rldic'. Through checking and analyzing the characters of the insns "li/lis;rldicX", all the possible constant values are considered by this patch. Previously, a patch is posted, but it is too large. https://gcc.gnu.org/pipermail/gcc-patches/2022-September/601276.html As suggested, I split it into this series. Considering the functionality and size, 4 patches are split as below: 1. Support the constants which can be built by "li;rotldi" Both positive and negative values from insn "li" are analyzed. 2. Support the constants which can be built by "lis;rotldi" We only need to analyze the negative value from "lis". And this patch uses more code to check leading 1s and tailing 0s from "lis". 3. Support the constants which can be built by "li/lis;rldicl/rldicr": Leverage the APIs defined/analyzed in patches 1 and 2, this patch checks the characters for the mask of "rldicl/rldicr" to support more constants. 4. Support the constants which can be built by "li/lis;rldic": The mask of "rldic" is relatively complicated, it is analyzed in this patch to support more constants. BR, Jeff (Jiufu)
Comments
Hi, Gental ping these patches: https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611286.html BR, Jeff (Jiufu) Jiufu Guo <guojiufu@linux.ibm.com> writes: > Hi, > > For a given constant, it would be profitable if we can use 2 insns to build. > This patch enables more constants building through 2 insns: one is "li or lis", > another is 'rldicl, rldicr or rldic'. > Through checking and analyzing the characters of the insns "li/lis;rldicX", > all the possible constant values are considered by this patch. > > Previously, a patch is posted, but it is too large. > https://gcc.gnu.org/pipermail/gcc-patches/2022-September/601276.html > As suggested, I split it into this series. > > Considering the functionality and size, 4 patches are split as below: > 1. Support the constants which can be built by "li;rotldi" > Both positive and negative values from insn "li" are analyzed. > 2. Support the constants which can be built by "lis;rotldi" > We only need to analyze the negative value from "lis". > And this patch uses more code to check leading 1s and tailing 0s from "lis". > 3. Support the constants which can be built by "li/lis;rldicl/rldicr": > Leverage the APIs defined/analyzed in patches 1 and 2, > this patch checks the characters for the mask of "rldicl/rldicr" > to support more constants. > 4. Support the constants which can be built by "li/lis;rldic": > The mask of "rldic" is relatively complicated, it is analyzed in this > patch to support more constants. > > BR, > Jeff (Jiufu)
Hi, I would like to ping these patches. [0/4] https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611286.html [1/4] https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611287.html [2/4] https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611288.html [3/4] https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611289.html [4/4] https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611290.html Any sugguestions for the code functionality/style or to make it easy for review, please point out, thanks in advance! BR, Jeff (Jiufu) Jiufu Guo via Gcc-patches <gcc-patches@gcc.gnu.org> writes: > Hi, > > Gental ping these patches: > https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611286.html > > BR, > Jeff (Jiufu) > > > Jiufu Guo <guojiufu@linux.ibm.com> writes: > >> Hi, >> >> For a given constant, it would be profitable if we can use 2 insns to build. >> This patch enables more constants building through 2 insns: one is "li or lis", >> another is 'rldicl, rldicr or rldic'. >> Through checking and analyzing the characters of the insns "li/lis;rldicX", >> all the possible constant values are considered by this patch. >> >> Previously, a patch is posted, but it is too large. >> https://gcc.gnu.org/pipermail/gcc-patches/2022-September/601276.html >> As suggested, I split it into this series. >> >> Considering the functionality and size, 4 patches are split as below: >> 1. Support the constants which can be built by "li;rotldi" >> Both positive and negative values from insn "li" are analyzed. >> 2. Support the constants which can be built by "lis;rotldi" >> We only need to analyze the negative value from "lis". >> And this patch uses more code to check leading 1s and tailing 0s from "lis". >> 3. Support the constants which can be built by "li/lis;rldicl/rldicr": >> Leverage the APIs defined/analyzed in patches 1 and 2, >> this patch checks the characters for the mask of "rldicl/rldicr" >> to support more constants. >> 4. Support the constants which can be built by "li/lis;rldic": >> The mask of "rldic" is relatively complicated, it is analyzed in this >> patch to support more constants. >> >> BR, >> Jeff (Jiufu)
Gentle ping... Jiufu Guo via Gcc-patches <gcc-patches@gcc.gnu.org> writes: > Hi, > > I would like to ping these patches. > [0/4] > https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611286.html > [1/4] > https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611287.html > [2/4] > https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611288.html > [3/4] > https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611289.html > [4/4] > https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611290.html > > Any sugguestions for the code functionality/style or to make > it easy for review, please point out, thanks in advance! > > > BR, > Jeff (Jiufu) > > Jiufu Guo via Gcc-patches <gcc-patches@gcc.gnu.org> writes: > >> Hi, >> >> Gental ping these patches: >> https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611286.html >> >> BR, >> Jeff (Jiufu) >> >> >> Jiufu Guo <guojiufu@linux.ibm.com> writes: >> >>> Hi, >>> >>> For a given constant, it would be profitable if we can use 2 insns to build. >>> This patch enables more constants building through 2 insns: one is "li or lis", >>> another is 'rldicl, rldicr or rldic'. >>> Through checking and analyzing the characters of the insns "li/lis;rldicX", >>> all the possible constant values are considered by this patch. >>> >>> Previously, a patch is posted, but it is too large. >>> https://gcc.gnu.org/pipermail/gcc-patches/2022-September/601276.html >>> As suggested, I split it into this series. >>> >>> Considering the functionality and size, 4 patches are split as below: >>> 1. Support the constants which can be built by "li;rotldi" >>> Both positive and negative values from insn "li" are analyzed. >>> 2. Support the constants which can be built by "lis;rotldi" >>> We only need to analyze the negative value from "lis". >>> And this patch uses more code to check leading 1s and tailing 0s from "lis". >>> 3. Support the constants which can be built by "li/lis;rldicl/rldicr": >>> Leverage the APIs defined/analyzed in patches 1 and 2, >>> this patch checks the characters for the mask of "rldicl/rldicr" >>> to support more constants. >>> 4. Support the constants which can be built by "li/lis;rldic": >>> The mask of "rldic" is relatively complicated, it is analyzed in this >>> patch to support more constants. >>> >>> BR, >>> Jeff (Jiufu)