From patchwork Wed Oct 4 12:39:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B8rgen_Kvalsvik?= X-Patchwork-Id: 148283 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp103697vqb; Wed, 4 Oct 2023 05:44:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHMubG5prkDZjTp4urDOmlmpRcKhl5GF1U8lhypLWjQVroWYIuRBrlpDzPEQQ0ePTWiSYRI X-Received: by 2002:a17:906:8b:b0:9a5:846d:d823 with SMTP id 11-20020a170906008b00b009a5846dd823mr2256133ejc.45.1696423472414; Wed, 04 Oct 2023 05:44:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696423472; cv=none; d=google.com; s=arc-20160816; b=cHk0eeiT4PPeINtAxK21YU92P47g+Bj3I/2xOoVqGUiceHEEYDgIRrpCAZOCO7Io++ o49haBWbcPww1oM3ELGzxuwEWBNSVVx9vhTNmeMtLqv8vjTjBi8G85fE119XDkAW6cf9 j9RxPPGufS5uqmY/Ue3itQMfseolNm9RjXp4TziaD3HtqIJDAHp2Mst4M8TO/Sc8ByNX 9a8mEHlD49knpJLiM12fT5VPfbbV7r0CgTpvDoaFo3B+2lneUuccbs8+H3Xo8f6/NaSK ZF4q3oSjJHNE+2bwGWsJ0eiq+33uIoSp991czbw90JHzHwtcXVj6HfxcERQuQ5uK4S56 OLoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dmarc-filter:delivered-to; bh=yRNC3H0NR45RucKQ0By1LvTH0IBUk6NNDUMi984pKec=; fh=CEeJ7+WMWhXQXVFKL0VPjjag+HM5tElSwmAChuvqRbA=; b=zrEXF2/KEphkeULfHIETG8dTQMm3waAXNDDUjCGbkt/9lId1c3eAcZxXsMeJG30fFh b9nVh66e511NceOAxpk5HXYY1tAGJtJnqUnLgM3rqEggJG/gjOwtXax8PUSbxNBJfdcF g2EYmZKxTSrfC0cJrmL2TJmODziplpzK+bYxJDdpJdE/ZYqsZG+BhGqa4bf49JjLmCzL bCxuOCi77VpmC9ZR8BAkAs7S3+uePSsvzCRJzacT375hcItr/29wfh7fbilA6f3fxQo3 ZrAyURETHFyTS/ogI2YuBLJ2lo2rIqkzeN3LX056EJyoqzAKkKGTyiQUI3YZPbV0jwwz 196g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kolabnow.com header.s=dkim20160331 header.b=WhuiYTLh; 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" Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id s9-20020a170906168900b009a210885fb9si1668776ejd.492.2023.10.04.05.44.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 05:44:32 -0700 (PDT) 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=@kolabnow.com header.s=dkim20160331 header.b=WhuiYTLh; 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B9081388211C for ; Wed, 4 Oct 2023 12:41:58 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx.kolabnow.com (mx.kolabnow.com [212.103.80.155]) by sourceware.org (Postfix) with ESMTPS id 222F6385B515 for ; Wed, 4 Oct 2023 12:40:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 222F6385B515 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lambda.is Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lambda.is Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id 5321B20AB2DF; Wed, 4 Oct 2023 14:40:35 +0200 (CEST) Authentication-Results: ext-mx-out011.mykolab.com (amavis); dkim=pass (4096-bit key) reason="pass (just generated, assumed good)" header.d=kolabnow.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1696423234; x=1698237635; bh=yRNC3H0NR45RucKQ0By1LvTH0IBUk6NNDUM i984pKec=; b=WhuiYTLhn9jp5DFeETGPsqmcfQI5QioGK84ToM+/uDMkG28nIo4 hkp1PS6DoDNmvv4gDV6aae63pStwBt68elppjwIwygqlKxY2ONs6Mi6C448hcES+ nDjNAt8r3yYFXk8jnXbnO8/JwxWbkPAz1aXnXVnkRWBqmZ9wXAqdvVtEZoptebyF onXyTSAYY/uJRpwWlGfeK/V8gZQbE8JYv8O2xL4iT5HwELg4eCwqprbS6iBfDwu2 kU79KBCfmgVZOKKiDirak6fEi72E87v5vh7N3Od+k5Em2B7ialwAZnr3a9TuV+WU GhrGUeBedYNB8ttrePshYt0efqW9ibE0xDEt8UGyVWkIm+UJTqkam6+bwTOwfw66 TnVX7Z/h4WD6Et9brX2DVP9QUDZQQeXqxsaMHvts5BArF6BZ+5mwvY8s7e98eukB xZqKB6FIv2cDcwwJsxC7nszmELk3Z3Ab+ih5KRr9knZudKq3ZfIfxWEtz/hrH9d4 iaJWEWfiGSTz2x4IaKl/uW1aspAcn/ij4fgI1WBeXQUg5sfhGmqC60E4V2SFwf0I qZ60J4U3rb5nvX1YjyFKuiIYji8ssoeu6P99AsQCB37vwRjDQSsIaTs1l1z6tDr4 WOlQPW/eosjo7xAwND+BmC37/Mb0RFpPlIri2inKS68g9Hnk/UUUkJkE= X-Virus-Scanned: amavis at mykolab.com X-Spam-Score: -0.999 X-Spam-Level: X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, SPAM_BODY, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out011.mykolab.com [127.0.0.1]) (amavis, port 10024) with ESMTP id EwGOiruCiRKw; Wed, 4 Oct 2023 14:40:34 +0200 (CEST) Received: from int-mx011.mykolab.com (unknown [10.9.13.11]) by mx.kolabnow.com (Postfix) with ESMTPS id BB5EC20B3679; Wed, 4 Oct 2023 14:40:34 +0200 (CEST) Received: from ext-subm010.mykolab.com (unknown [10.9.6.10]) by int-mx011.mykolab.com (Postfix) with ESMTPS id A74653081E50; Wed, 4 Oct 2023 14:40:34 +0200 (CEST) From: =?utf-8?q?J=C3=B8rgen_Kvalsvik?= To: gcc-patches@gcc.gnu.org Cc: mliska@suse.cz, jh@suse.cz, =?utf-8?q?J=C3=B8rgen_Kvalsvik?= Subject: [PATCH 06/22] Use popcount_hwi rather than builtin Date: Wed, 4 Oct 2023 21:39:06 +0900 Message-Id: <20231004123921.634024-7-j@lambda.is> In-Reply-To: <20231004123921.634024-1-j@lambda.is> References: <20231004123921.634024-1-j@lambda.is> MIME-Version: 1.0 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778828939090695585 X-GMAIL-MSGID: 1778828939090695585 From: Jørgen Kvalsvik --- gcc/gcov.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/gcov.cc b/gcc/gcov.cc index 274f2fc5d9f..35be97cf5ac 100644 --- a/gcc/gcov.cc +++ b/gcc/gcov.cc @@ -46,6 +46,7 @@ along with Gcov; see the file COPYING3. If not see #include "color-macros.h" #include "pretty-print.h" #include "json.h" +#include "hwint.h" #include #include @@ -159,7 +160,7 @@ condition_info::condition_info (): truev (0), falsev (0), n_terms (0) int condition_info::popcount () const { - return __builtin_popcountll (truev) + __builtin_popcountll (falsev); + return popcount_hwi (truev) + popcount_hwi (falsev); } /* Describes a basic block. Contains lists of arcs to successor and