From patchwork Sat Apr 27 05:25:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 89071 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4E9793858C31 for ; Sat, 27 Apr 2024 05:26:41 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by sourceware.org (Postfix) with ESMTPS id 9C1C73858D28 for ; Sat, 27 Apr 2024 05:26:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9C1C73858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=quicinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9C1C73858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714195574; cv=none; b=uPI2/fLJDnWs/no+WI5m6aBHcE+p/4RXfoCbT0sqb236pzH2QVIvZA7xpofdCOw2wqYZ6zvPwV4sosZcG/H89mqAyPSFYlg9mAaYd6BR3d2OlGyI2imKgPskT//+fXc4Gid8P3WP54efgRUn4dwH+LISlKm2hcFHtHXnz2gyk2Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714195574; c=relaxed/simple; bh=HPAqBRIhx/beWV2/QYOQioqCXLLCbCl2Hzh9wuycmTU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Y7xJnrkg0bRgcxnjHL/TMOpCHMjwR/pYCRPoTo5fP8nBdsGdm9xUJNNwjKc7s2KH0bVa0mBuZ6fCa1Im9B88DjFF+v1xqtkPn6RoyT3tl5J0sw+W5rvhMwcIDbvOB1ebv7mAWazHN7GF6E6/v6ZyDnes3b0D3ez0WhW2BOQP4VE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43R5Ai88031984 for ; Sat, 27 Apr 2024 05:26:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=qcppdkim1; bh=LdQMrUH TtEXv239K7ZbWA+g53BNxJGDbmUvgG+9MfSo=; b=Y4pt9w+wYFNe9a8jdsiLC5D BwyoyIsvVvSw8yXQhA/+WL+ctP5fOZufZAF3SOcC4bYI/ebICZKpZWA1v3VomE9H xQEfpZZaZ1/NEiFCK8iT/M1gVr2oTHGvV5I7aM7Tk55fQjqidpgrtKMi0+Ywp1iQ oKr0naBiez38GRGopN1W+atwAQyq6B+qdpdPp5oZm75uNqJuK6B9fyH0EUAv4mvJ kNEdriPbs1PvBQLOG9rj2UDHgpWp8OGpc/Xd0w3rMZ7JnFBls5gBS85U9pOOenyG bylAuVWU6IowvcDUfU1O+Pk+K6w6E/ABy26HiXyBWiKYQI+Glh+qpvol6wXYWIw= = Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xrsrcr35g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 27 Apr 2024 05:26:11 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43R5QA0u026266 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 27 Apr 2024 05:26:10 GMT Received: from hu-apinski-lv.qualcomm.com (10.49.16.6) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Fri, 26 Apr 2024 22:26:10 -0700 From: Andrew Pinski To: CC: Andrew Pinski Subject: [PATCH] Remove m_nloops field from loop_versioning Date: Fri, 26 Apr 2024 22:25:59 -0700 Message-ID: <20240427052559.3263539-1-quic_apinski@quicinc.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: vUWAce_u9Jm46iw9C4BTeg7fq5Mhscoc X-Proofpoint-ORIG-GUID: vUWAce_u9Jm46iw9C4BTeg7fq5Mhscoc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-27_02,2024-04-26_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 mlxlogscore=579 mlxscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 impostorscore=0 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404270036 X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org This is a small cleanup of loop_versioning where m_nloops is only used in the constructor so we can remove the whole field. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * gimple-loop-versioning.cc (loop_versioning): Remove m_nloops field. (loop_versioning::loop_versioning): Remove initialization of m_nloops field and move it to be a local variable. (loop_versioning::analyze_blocks): Fix formating. --- gcc/gimple-loop-versioning.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gcc/gimple-loop-versioning.cc b/gcc/gimple-loop-versioning.cc index 17877f06921..adea207659b 100644 --- a/gcc/gimple-loop-versioning.cc +++ b/gcc/gimple-loop-versioning.cc @@ -322,9 +322,6 @@ private: /* An obstack to use for general allocation. */ obstack m_obstack; - /* The number of loops in the function. */ - unsigned int m_nloops; - /* The total number of loop version conditions we've found. */ unsigned int m_num_conditions; @@ -525,10 +522,10 @@ loop_versioning::name_prop::value_of_expr (tree val, gimple *) loop_versioning::loop_versioning (function *fn) : m_fn (fn), - m_nloops (number_of_loops (fn)), m_num_conditions (0), m_address_table (31) { + unsigned m_nloops = number_of_loops (fn); bitmap_obstack_initialize (&m_bitmap_obstack); gcc_obstack_init (&m_obstack); @@ -1437,7 +1434,7 @@ loop_versioning::analyze_blocks () { linfo.rejected_p = true; break; - } + } if (!linfo.rejected_p) {