From patchwork Thu Sep 5 08:10:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 1981135 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=PaSbCCWs; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WzsZd5Xzcz1yg7 for ; Thu, 5 Sep 2024 18:14:01 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 168B43864835 for ; Thu, 5 Sep 2024 08:13:59 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id BC77C3850200 for ; Thu, 5 Sep 2024 08:11:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BC77C3850200 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BC77C3850200 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725523875; cv=none; b=PIRvdQ38rLzh4eMasyz3skQHJl+Nj9b/KUXm2kNIjKvbj1xB0SOPW3ZqjryHsMn4+YJ78HO2PzT53b+rZvEtO+i15blFLmnnbvrZKtY/97yw4cXSf20XmiWOAVWa4ceLCziu3sg2/nqx/qORsTwWqVA75ho7VOgQSBWmYYIv6bQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725523875; c=relaxed/simple; bh=IrpQM3jCVrfXmjkpZZGEGU3uIf/KNhkEfv0aRY5cP1Y=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=dEB5lSJ2oNJmMXlxJsELxVYaGEvqqbJQemqFipGfDfZH19yZLShgEbbEjaHsYMEGWfgDldiXJhuKYgBaQVjFGCY8iL0xU2+9yeYP5DlouPI5uQggInJboMbbtvcXte0qvSzIAuG1646g/nehjCnt1Qqa+6LfSbCs5Nq00w3GnKs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-42c7a49152aso4271205e9.2 for ; Thu, 05 Sep 2024 01:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1725523872; x=1726128672; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/es40Z7PTsen2bNT7nC6b0bU3+DH+I9+K7wZ/2aYu+c=; b=PaSbCCWsRQnuL1l9REREl40NxDPAW0paMWgdsP3Mv0r4ABg6YDhBG5g2HGXzgPJG2U P7oF9V2SUmn4iucnMDz3771qdwayK6HfZfnmtdQggPa/hN9MalkictRXoc7h/tuoyEI1 ql/H/M1sxHWekvThqc6qARmmxAZalVptZYoIG1EIE3nDNJgvXCsqDRjjiqb8K2m5h+H5 IWSPNNdIqI6orIHsPMkBr9Dp5+t547oP52Fu94mYkT3nzr8TuzNaCUpxJSg77jhSJwG3 sbh5UepK3TBwI5IJRZgCZuKU2e8UhbhSFKvFVxbtMZq6Xp652cgNGjxeemMIuql6eICb 1hLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725523872; x=1726128672; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/es40Z7PTsen2bNT7nC6b0bU3+DH+I9+K7wZ/2aYu+c=; b=r4LKj/6cLK32NcErKycpKOl5dCkjhZHH1bsWMxGFEK2HqWgrhmvx625OsjXpKPftCI M+vUlBdBLz6VV6ufxt9DF0rH3UWbu3WhhPq0zaaDTC6IuEhuuwDu4EcbNboC9GbLYawb oe/6LpwOI025fUOHEa0nX30z7DC8ugX8WHSNlleRL6fQQIWBAPlHTbq95evuXBESRPjf V8wBquHZLSC4HKYP9bxPjcFZbS70PiN0aUGVT7ILW/pDWcCWyR0kjvRTY+f6/8F8H3F5 N6T2RFehuN3rFBZy5XncgDG/uGY6w2yfx/zkYEN8NvA41/OKrzIPYu+vvkKjDH3FPL5v 99gw== X-Gm-Message-State: AOJu0Yz3VFnBULpleGnIlcXWmEaBHAEC0T8JkIKtz9HbCTcr7ZRK7Wgf 5ReKRZrOmVQ0Goj3f47UmXtq9vUMyFjd7OEmgs1dM8twEC3/b2cb31/Rff5fjKFiYYwlnJ8m4Ig = X-Google-Smtp-Source: AGHT+IHMDtD/Okv5b4z82Qc44RTv1fTuYcUdoZwcP68J/b8fo9y3KeIFBYBqjUsY7NxNvG+Ozr5uow== X-Received: by 2002:a05:600c:3ba3:b0:426:690d:d5b7 with SMTP id 5b1f17b1804b1-42c9a38b220mr13122125e9.25.1725523872425; Thu, 05 Sep 2024 01:11:12 -0700 (PDT) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42baf7fa745sm242524555e9.31.2024.09.05.01.11.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 01:11:12 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [COMMITTED 4/6] ada: Remove unused parameters in validity checking routine Date: Thu, 5 Sep 2024 10:10:54 +0200 Message-ID: <20240905081056.2402112-4-poulhies@adacore.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240905081056.2402112-1-poulhies@adacore.com> References: <20240905081056.2402112-1-poulhies@adacore.com> MIME-Version: 1.0 X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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~incoming=patchwork.ozlabs.org@gcc.gnu.org From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ * exp_util.ads, exp_util.adb (Duplicate_Subexpr_No_Checks): Remove parameters, which are no longer used. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_util.adb | 18 ++++++------------ gcc/ada/exp_util.ads | 16 +++------------- 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 8e5cdb7332e..9b67384755a 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -5049,23 +5049,17 @@ package body Exp_Util is --------------------------------- function Duplicate_Subexpr_No_Checks - (Exp : Node_Id; - Name_Req : Boolean := False; - Renaming_Req : Boolean := False; - Related_Id : Entity_Id := Empty; - Is_Low_Bound : Boolean := False; - Is_High_Bound : Boolean := False) return Node_Id + (Exp : Node_Id; + Name_Req : Boolean := False; + Renaming_Req : Boolean := False) return Node_Id is New_Exp : Node_Id; begin Remove_Side_Effects - (Exp => Exp, - Name_Req => Name_Req, - Renaming_Req => Renaming_Req, - Related_Id => Related_Id, - Is_Low_Bound => Is_Low_Bound, - Is_High_Bound => Is_High_Bound); + (Exp => Exp, + Name_Req => Name_Req, + Renaming_Req => Renaming_Req); New_Exp := New_Copy_Tree (Exp); Remove_Checks (New_Exp); diff --git a/gcc/ada/exp_util.ads b/gcc/ada/exp_util.ads index 279feb2e6fe..49e75c79d35 100644 --- a/gcc/ada/exp_util.ads +++ b/gcc/ada/exp_util.ads @@ -457,24 +457,14 @@ package Exp_Util is -- following functions allow this behavior to be modified. function Duplicate_Subexpr_No_Checks - (Exp : Node_Id; - Name_Req : Boolean := False; - Renaming_Req : Boolean := False; - Related_Id : Entity_Id := Empty; - Is_Low_Bound : Boolean := False; - Is_High_Bound : Boolean := False) return Node_Id; + (Exp : Node_Id; + Name_Req : Boolean := False; + Renaming_Req : Boolean := False) return Node_Id; -- Identical in effect to Duplicate_Subexpr, except that Remove_Checks is -- called on the result, so that the duplicated expression does not include -- checks. This is appropriate for use when Exp, the original expression is -- unconditionally elaborated before the duplicated expression, so that -- there is no need to repeat any checks. - -- - -- Related_Id denotes the entity of the context where Expr appears. Flags - -- Is_Low_Bound and Is_High_Bound specify whether the expression to check - -- is the low or the high bound of a range. These three optional arguments - -- signal Remove_Side_Effects to create an external symbol of the form - -- Chars (Related_Id)_FIRST/_LAST. For suggested use of these parameters - -- see the warning in the body of Sem_Ch3.Process_Range_Expr_In_Decl. function Duplicate_Subexpr_Move_Checks (Exp : Node_Id;