From patchwork Thu Jun 20 08:53:03 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: 1950012 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=Nn6C0ggn; 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 4W4ZWR5xnzz20X8 for ; Thu, 20 Jun 2024 19:12:19 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AC36F388A025 for ; Thu, 20 Jun 2024 09:12:17 +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 A7A033888C5F for ; Thu, 20 Jun 2024 08:53:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A7A033888C5F 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 A7A033888C5F 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=1718873629; cv=none; b=hH9p7GXDfKQvtn2m09y5/UsY9iBS80QErQWSm3xknMeEVC+k5XgXDvFiPi051PjqK6KCZsyq8W2G41BCmlLVdGLqYSmigFHaFcFK5YxFI4qO8ew4DgW8N6Ch+jUuTvz7++RdlXtSpXEVslMBD1z0tr0QBubSYFl0o1VI4PiMxMk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718873629; c=relaxed/simple; bh=dgfg541f7axAQI36wZG3S1+4oTmVD7LcKyBv4lztrxg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=nz/5gnCisSADbPEXcXC1GjYSdGaNGVlWwRX9r7SzuQPNtAMZgLMLtWg1M5uAHU5+qrw/NDbkRWvaVWJk03GdnsjTA+hZMfIYWjpQi+iiOl8IZ6CANR+0xYl900W+GOZn1t8TmHp9lAEBdFhxVOPjywCyQ/wt4E3utAKlc7zD3+s= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-42121d27861so7060405e9.0 for ; Thu, 20 Jun 2024 01:53:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718873621; x=1719478421; 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=a2fBn8oH9/eIzV1WefnR6gNa4cZawFV9WrptHbQDS3I=; b=Nn6C0ggnMpKUPju8D9nkB1SLZwm8e+tnI32GBLtQdm35FXwWAAwAYBNkRIYSTiZmZv IgHTE7OCe2cN55YXVkX6loNcPXrpzlN1Z/jNQPcnNLu+S5GTo3qoBpyQQNkZJsMvPtWL v7u03bHVfVALnhDHzVrdF1LIE0qvxxSxtJcqKAV46+U2dM3tZIvc3mNG4/O+Wpr2u1Is 51fWmYvQAe6z0wEGSfHBtsNPoQsLvV0TXlb2dYf5Rysf/OH28aABFFnqUVZjGXl02jwb YBAhnjCggxI5tdFkt36uDHMK9zd/UVgU9CgbHocZuzOnrRV/Ak/VXZKjn14IlM7mfSTU GE0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718873621; x=1719478421; 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=a2fBn8oH9/eIzV1WefnR6gNa4cZawFV9WrptHbQDS3I=; b=gNBWd49SfF/kp4EKa8xqOUsCwvCMW79PueAzu514NAcw2udGlppaAeYvtKHcykAwGT IfvRxqnzIib8VJy8Udc67G2xEAHU8GEDidw4cmpSzl/jPFfG7v7EyGHnoXmQ+0hDQaeD xj8H9ZModLnVKSBU4qneQh9feMLc9V3j7KR1di9jps8XM/VJkBhaiAR8HU3gtTijAYJF /ZMufxub1wwZEo1RFTszpa0JsXbRlfLsCCk7RPdbBZpgHtTpSkk1jsp5ozAgy1P9eXwb KzyEqynTb/0XhhqEatyvSUjdZGXEh90M7BstkW3lLdDxT7IxXRZOZ0V1DuPIFTt3dKPF W92g== X-Gm-Message-State: AOJu0YxA6s7ZNpzEjvvTNOfor48owQFLWwnKIWQvr/3mD+qNzSOTD/fm 4xK4Mnd8qG3JEYzQxxRh6L43oXRrWC4nSPdzu39OrLHLCxuCcrHNBZnsf8hEArEYLMRJVCYmqnE = X-Google-Smtp-Source: AGHT+IHaQQI4Gc8FRvuiyYOh49tICLemPwIemtCIpuHB0BP8wc/+hhfQ58/zJ4lxdMVBna09FJgYpw== X-Received: by 2002:adf:fe0b:0:b0:362:541d:2488 with SMTP id ffacd0b85a97d-36313eddf8dmr3503281f8f.0.1718873621366; Thu, 20 Jun 2024 01:53:41 -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 ffacd0b85a97d-363c795febfsm3305522f8f.104.2024.06.20.01.53.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 01:53:40 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: [COMMITTED 13/30] ada: Remove Max_Entry_Queue_Depth pragma/aspect Date: Thu, 20 Jun 2024 10:53:03 +0200 Message-ID: <20240620085321.2412421-13-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240620085321.2412421-1-poulhies@adacore.com> References: <20240620085321.2412421-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: Eric Botcazou It was implemented apparently because a very early version of AI12-0164 that standardizes GNAT's Max_Queue_Length opted for the subtly different moniker, but later versions of the AI use Max_Entry_Queue_Length instead. gcc/ada/ * aspects.ads (Aspect_Id): Remove Aspect_Max_Entry_Queue_Depth. (global arrays): Remove entry for it. * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove reference to pragma Max_Entry_Queue_Depth in comment. * par-prag.adb (Prag): Remove handling of Pragma_Max_Entry_Queue_Depth. * sem_ch13.adb (Analyze_Aspect_Specifications): Remove reference to aspect Max_Entry_Queue_Depth in comment. (Analyze_Aspect_Specifications): Remove processing of aspect Max_Entry_Queue_Depth. (Check_Aspect_At_Freeze_Point): Likewise. * sem_prag.ads (Find_Related_Declaration_Or_Body): Remove reference to pragma Max_Entry_Queue_Depth in comment. * sem_prag.adb (Analyze_Pragma): Remove processing of pragma Max_Entry_Queue_Depth. (Sig_Flags): Remove entry for Pragma_Max_Entry_Queue_Depth. * sem_util.adb (Get_Max_Queue_Length): Remove handling of pragma Max_Entry_Queue_Depth. (Has_Max_Queue_Length): Likewise. * snames.ads-tmpl (Name_Max_Entry_Queue_Depth): Move back from pragmas section to others section. (Pragma_Id): Remove Pragma_Max_Entry_Queue_Depth. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/aspects.ads | 6 ------ gcc/ada/exp_ch9.adb | 3 +-- gcc/ada/par-prag.adb | 1 - gcc/ada/sem_ch13.adb | 15 --------------- gcc/ada/sem_prag.adb | 13 +------------ gcc/ada/sem_prag.ads | 1 - gcc/ada/sem_util.adb | 11 +++-------- gcc/ada/snames.ads-tmpl | 3 +-- 8 files changed, 6 insertions(+), 47 deletions(-) diff --git a/gcc/ada/aspects.ads b/gcc/ada/aspects.ads index 202d42193d1..140fb7c8fe1 100644 --- a/gcc/ada/aspects.ads +++ b/gcc/ada/aspects.ads @@ -114,7 +114,6 @@ package Aspects is Aspect_Linker_Section, -- GNAT Aspect_Local_Restrictions, -- GNAT Aspect_Machine_Radix, - Aspect_Max_Entry_Queue_Depth, -- GNAT Aspect_Max_Entry_Queue_Length, Aspect_Max_Queue_Length, -- GNAT Aspect_Object_Size, @@ -304,7 +303,6 @@ package Aspects is Aspect_Linker_Section => True, Aspect_Local_Restrictions => True, Aspect_Lock_Free => True, - Aspect_Max_Entry_Queue_Depth => True, Aspect_Max_Queue_Length => True, Aspect_No_Caching => True, Aspect_No_Elaboration_Code_All => True, @@ -450,7 +448,6 @@ package Aspects is Aspect_Linker_Section => Expression, Aspect_Local_Restrictions => Expression, Aspect_Machine_Radix => Expression, - Aspect_Max_Entry_Queue_Depth => Expression, Aspect_Max_Entry_Queue_Length => Expression, Aspect_Max_Queue_Length => Expression, Aspect_Object_Size => Expression, @@ -549,7 +546,6 @@ package Aspects is Aspect_Linker_Section => True, Aspect_Local_Restrictions => False, Aspect_Machine_Radix => True, - Aspect_Max_Entry_Queue_Depth => False, Aspect_Max_Entry_Queue_Length => False, Aspect_Max_Queue_Length => False, Aspect_Object_Size => True, @@ -732,7 +728,6 @@ package Aspects is Aspect_Lock_Free => Name_Lock_Free, Aspect_Local_Restrictions => Name_Local_Restrictions, Aspect_Machine_Radix => Name_Machine_Radix, - Aspect_Max_Entry_Queue_Depth => Name_Max_Entry_Queue_Depth, Aspect_Max_Entry_Queue_Length => Name_Max_Entry_Queue_Length, Aspect_Max_Queue_Length => Name_Max_Queue_Length, Aspect_No_Caching => Name_No_Caching, @@ -1046,7 +1041,6 @@ package Aspects is Aspect_Initial_Condition => Never_Delay, Aspect_Local_Restrictions => Never_Delay, Aspect_Initializes => Never_Delay, - Aspect_Max_Entry_Queue_Depth => Never_Delay, Aspect_Max_Entry_Queue_Length => Never_Delay, Aspect_Max_Queue_Length => Never_Delay, Aspect_No_Caching => Never_Delay, diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index 890bd038c5b..a8c70598fa5 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -9376,8 +9376,7 @@ package body Exp_Ch9 is Need_Array : Boolean := False; begin - -- First check if there is any Max_Queue_Length, - -- Max_Entry_Queue_Length or Max_Entry_Queue_Depth pragma. + -- First check if there is any Max_[Entry_]Queue_Length pragma Item := First_Entity (Prot_Typ); while Present (Item) loop diff --git a/gcc/ada/par-prag.adb b/gcc/ada/par-prag.adb index 4d10a6e060a..04eed22031a 100644 --- a/gcc/ada/par-prag.adb +++ b/gcc/ada/par-prag.adb @@ -1484,7 +1484,6 @@ begin | Pragma_Machine_Attribute | Pragma_Main | Pragma_Main_Storage - | Pragma_Max_Entry_Queue_Depth | Pragma_Max_Entry_Queue_Length | Pragma_Max_Queue_Length | Pragma_Memory_Size diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index a35b67eddc8..f2f1b0cb853 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -1449,7 +1449,6 @@ package body Sem_Ch13 is -- Global -- Initial_Condition -- Initializes - -- Max_Entry_Queue_Depth -- Max_Entry_Queue_Length -- Max_Queue_Length -- No_Caching @@ -3759,19 +3758,6 @@ package body Sem_Ch13 is goto Continue; end Initializes; - -- Max_Entry_Queue_Depth - - when Aspect_Max_Entry_Queue_Depth => - Aitem := Make_Aitem_Pragma - (Pragma_Argument_Associations => New_List ( - Make_Pragma_Argument_Association (Loc, - Expression => Relocate_Node (Expr))), - Pragma_Name => Name_Max_Entry_Queue_Depth); - - Decorate (Aspect, Aitem); - Insert_Pragma (Aitem); - goto Continue; - -- Max_Entry_Queue_Length when Aspect_Max_Entry_Queue_Length => @@ -11551,7 +11537,6 @@ package body Sem_Ch13 is | Aspect_Implicit_Dereference | Aspect_Initial_Condition | Aspect_Initializes - | Aspect_Max_Entry_Queue_Depth | Aspect_Max_Entry_Queue_Length | Aspect_Max_Queue_Length | Aspect_Obsolescent diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index d3b29089d77..772bf1b1abb 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -20464,11 +20464,7 @@ package body Sem_Prag is -- pragma Max_Entry_Queue_Length (static_integer_EXPRESSION); - -- This processing is shared by Pragma_Max_Entry_Queue_Depth and - -- Pragma_Max_Queue_Length. - when Pragma_Max_Entry_Queue_Length - | Pragma_Max_Entry_Queue_Depth | Pragma_Max_Queue_Length => Max_Entry_Queue_Length : declare @@ -20478,9 +20474,7 @@ package body Sem_Prag is Val : Uint; begin - if Prag_Id = Pragma_Max_Entry_Queue_Depth - or else Prag_Id = Pragma_Max_Queue_Length - then + if Prag_Id = Pragma_Max_Queue_Length then GNAT_Pragma; end if; @@ -20516,10 +20510,6 @@ package body Sem_Prag is and then Prag_Id /= Pragma_Max_Entry_Queue_Length) or else - (Has_Rep_Pragma (Entry_Id, Name_Max_Entry_Queue_Depth) - and then - Prag_Id /= Pragma_Max_Entry_Queue_Depth) - or else (Has_Rep_Pragma (Entry_Id, Name_Max_Queue_Length) and then Prag_Id /= Pragma_Max_Queue_Length) @@ -32766,7 +32756,6 @@ package body Sem_Prag is Pragma_Machine_Attribute => -1, Pragma_Main => -1, Pragma_Main_Storage => -1, - Pragma_Max_Entry_Queue_Depth => 0, Pragma_Max_Entry_Queue_Length => 0, Pragma_Max_Queue_Length => 0, Pragma_Memory_Size => 0, diff --git a/gcc/ada/sem_prag.ads b/gcc/ada/sem_prag.ads index 42c38d8e126..59220ea890c 100644 --- a/gcc/ada/sem_prag.ads +++ b/gcc/ada/sem_prag.ads @@ -467,7 +467,6 @@ package Sem_Prag is -- Extensions_Visible -- Global -- Initializes - -- Max_Entry_Queue_Depth -- Max_Entry_Queue_Length -- Max_Queue_Length -- Post diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 8479e8c4661..7f5d70245dd 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -10709,8 +10709,6 @@ package body Sem_Util is function Get_Max_Queue_Length (Id : Entity_Id) return Uint is pragma Assert (Is_Entry (Id)); PMQL : constant Entity_Id := Get_Pragma (Id, Pragma_Max_Queue_Length); - PMEQD : constant Entity_Id := - Get_Pragma (Id, Pragma_Max_Entry_Queue_Depth); PMEQL : constant Entity_Id := Get_Pragma (Id, Pragma_Max_Entry_Queue_Length); Max : Uint; @@ -10725,9 +10723,6 @@ package body Sem_Util is if Present (PMQL) then Max := Expr_Value (Expression (First (Pragma_Argument_Associations (PMQL)))); - elsif Present (PMEQD) then - Max := Expr_Value - (Expression (First (Pragma_Argument_Associations (PMEQD)))); elsif Present (PMEQL) then Max := Expr_Value (Expression (First (Pragma_Argument_Associations (PMEQL)))); @@ -12224,9 +12219,9 @@ package body Sem_Util is return Ekind (Id) = E_Entry and then - (Present (Get_Pragma (Id, Pragma_Max_Queue_Length)) or else - Present (Get_Pragma (Id, Pragma_Max_Entry_Queue_Depth)) or else - Present (Get_Pragma (Id, Pragma_Max_Entry_Queue_Length))); + (Present (Get_Pragma (Id, Pragma_Max_Queue_Length)) + or else + Present (Get_Pragma (Id, Pragma_Max_Entry_Queue_Length))); end Has_Max_Queue_Length; --------------------------------- diff --git a/gcc/ada/snames.ads-tmpl b/gcc/ada/snames.ads-tmpl index d2f724f86ca..ade933e0bbc 100644 --- a/gcc/ada/snames.ads-tmpl +++ b/gcc/ada/snames.ads-tmpl @@ -613,7 +613,6 @@ package Snames is Name_Machine_Attribute : constant Name_Id := N + $; -- GNAT Name_Main : constant Name_Id := N + $; -- GNAT Name_Main_Storage : constant Name_Id := N + $; -- GNAT - Name_Max_Entry_Queue_Depth : constant Name_Id := N + $; -- GNAT Name_Max_Entry_Queue_Length : constant Name_Id := N + $; -- Ada 12 Name_Max_Queue_Length : constant Name_Id := N + $; -- GNAT Name_Memory_Size : constant Name_Id := N + $; -- Ada 83 @@ -829,6 +828,7 @@ package Snames is Name_Link_Name : constant Name_Id := N + $; Name_Low_Order_First : constant Name_Id := N + $; Name_Lowercase : constant Name_Id := N + $; + Name_Max_Entry_Queue_Depth : constant Name_Id := N + $; Name_Max_Size : constant Name_Id := N + $; Name_Mechanism : constant Name_Id := N + $; Name_Message : constant Name_Id := N + $; @@ -1900,7 +1900,6 @@ package Snames is Pragma_Machine_Attribute, Pragma_Main, Pragma_Main_Storage, - Pragma_Max_Entry_Queue_Depth, Pragma_Max_Entry_Queue_Length, Pragma_Max_Queue_Length, Pragma_Memory_Size,