Message ID | 20231107091954.3905945-1-poulhies@adacore.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:aa0b:0:b0:403:3b70:6f57 with SMTP id k11csp112496vqo; Tue, 7 Nov 2023 01:23:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IE3QBipiYGgcHnA2Z0JMDt+eq8rkxMJgIC9F1mMHBY87bzWwzyd/VceUQeUJLMPVkgez6cf X-Received: by 2002:a05:6214:268d:b0:66d:bdd3:5d5 with SMTP id gm13-20020a056214268d00b0066dbdd305d5mr34712699qvb.0.1699349013289; Tue, 07 Nov 2023 01:23:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699349013; cv=pass; d=google.com; s=arc-20160816; b=mjhuEw1jAdFo75eyUTxvo3hSmq/40fxCvMko0LErymH/qSNwkFs+p7ypxYHJPqmGo8 lD4cOLNXwvS+rbOSelJyQhGiqiGN7qCUT393uolapK+ez271UP+avmvyP79CkJp3wjtO bX7yt/63Qqmu+c6K+tK+Jq/+UKp2c2qILKEWnLSxTqdJ3aEZshxRKJeIQtJJdqUFdvyB 1xYdrqJX1Hc/e0l0owMnKi2Ql5bBys28LHQ9K+kDDHKWBn3ddzN7HW3xUYfwADJHprYN 3Y6vWsX/q4tAaVej9ew88Dg7ruxOn6GeOmNpO01AJt6pOajtZF/dvX9leuCI6q2RnA64 1BBg== ARC-Message-Signature: i=2; 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:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=F192gjNizGYWFNKxH9SPrI0/nPkg+4FBDWzl3GQ4tcY=; fh=QRb7QY4BZ0mIIAPiH2G4K0PcYKRtRn2i5A6VLUA8cN4=; b=RDE2nHbqAZ+htFkMm6Pk4GbwNNEDods36xmjJhBsjBikezrX+cmAP5QQY58oLHbqM0 JR4JPkW2KO/eNJBETYmq4U+EJU8hFupoHyPIfINdx+fFCLyjiY8Siyj0L6eVskZJRZdh g0EN1PMJDiaAmx6qxGJIvvkvpcVND22H+t3mqbPhdxwhQDa8lXZBwCcVYRzqo7XamoxU 1qQ/xK9VUp0cSVZVMM/WnQ4uKMOB8Lo+ktcPG6SOwofv6PwVCHn4FZeVbhkFk3n1in+T HNF7hXNhDXypHzqQSvvP8TUPdaMZ74N8imWY3F3lmJ1VhByGpOU90NQFrNL4tVUnfmcY 5JBQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b=EWpaykrh; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id g3-20020ad45143000000b0065b21846028si6936468qvq.531.2023.11.07.01.23.33 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 01:23:33 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b=EWpaykrh; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EED7F3882642 for <ouuuleilei@gmail.com>; Tue, 7 Nov 2023 09:22:36 +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 1B835386181F for <gcc-patches@gcc.gnu.org>; Tue, 7 Nov 2023 09:19:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1B835386181F Authentication-Results: sourceware.org; dmarc=pass (p=none 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 1B835386181F 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=1699348800; cv=none; b=pgF5BRTOe8Eb2SrJT8IvHcgp/0ueQJmUhcfRzpmbaZGtNApQ0Kq7Wkd7FFiW5g2/5RdpZKY04c4409lRuUzb52NSK4zrzaptFHucXeIiRmLZ1qS9WGtCw80El+xORsOGwWbpeQ0ngYWQ+dGDMcozvYkkDoMOEB8jW4uIddsjhfA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699348800; c=relaxed/simple; bh=EKiZqAPBu4ARYWrKZJRW6JudxIgKYW6qoXDgb2zg+l4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=GBssNzyYTVuk5WxUduJgsoaXDtPY/KTq8Uu5G5zKsQCKz6MpHWQmJMkxHF0TJ/BWm1s7gOn0yoqPB5gKL96+S6OY5OtTqjf/NS41pQpM00zJkUPZ4gObL+UgfHn+odDMsbykovKxDA2WSM9eIgOZd7T+2aFDNDzSLEhGNRGmrWs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-408425c7c10so39915655e9.0 for <gcc-patches@gcc.gnu.org>; Tue, 07 Nov 2023 01:19:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1699348798; x=1699953598; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=F192gjNizGYWFNKxH9SPrI0/nPkg+4FBDWzl3GQ4tcY=; b=EWpaykrh7wryvPGCHaej65nogIIgoS0SNYx07BeUiaomqfiSJ9HNcCwKpd/m7Un1Td JTqsduPLP3+lPiDE0h7Nbti4eVAbH6sYGrOQbkDhW25Y2IiofoU1Vo3QcwYEuiaIwmB/ MUj90BXoSGKmPd0iQV904ghFEDyNjohNonczdmrfMg8AB59DrD1nYQI+RUAzO/Srb8rV PGXCQV3EfF51MB/J+0HeUGPqPzl56EDio8UkSxR1OxZ1OWr2ZsAvuRh7xii7TkUOIxwL neSFfimrnzdgzVf3hyFF9O+NCNWKZszp+rg8HJDb0rcFIVwGx0G327PHCdIhXRirRttq OiWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699348798; x=1699953598; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=F192gjNizGYWFNKxH9SPrI0/nPkg+4FBDWzl3GQ4tcY=; b=QlHsM0NRf3Ebv1q9oZt2VsnMuwLP1nnI9BPDHLALdrVw2uiAA4nTQFsF8PB6aLWpJB eAoyumCvJI250hODshF4nsWXVXa4Wv9OBhOdU7pECocjIkPQgTVTmvGln5ld1xzbredr nLQOJDOwyeakoQK7bDgYuT/2W0b4t8LC6FZ/K3HKNjPJ3kyLH9yTn/2ukeHv8ddZNpRI 4sfjP4GaEa9Dik6fp8pwEIsQLkOqiFOPd6U3TSrd+aHytCxYTse2MbP9wCTtY+oRIUxs FSHtSieLjHs5cXKAbCYRR4FzuZ3y1dQJ13EmXHoVI0T+TxmhBYXDCydxbYknjSrF2+iI 1ZMg== X-Gm-Message-State: AOJu0YwZa5tdvN4CFwVPzzRpR8yCJgtwnTQJfqXOw4vG4rl5ihjEid0y iHDySIrOeeCq3PyHAK9QOknF6AAcBh69G6HUJXoV3Q== X-Received: by 2002:a05:600c:4587:b0:3fe:ba7:f200 with SMTP id r7-20020a05600c458700b003fe0ba7f200mr1747487wmo.20.1699348797867; Tue, 07 Nov 2023 01:19:57 -0800 (PST) Received: from localhost.localdomain ([2001:861:3382:1a90:dbc1:a1d1:2e58:4040]) by smtp.gmail.com with ESMTPSA id f13-20020a05600c4e8d00b0040596352951sm14737944wmq.5.2023.11.07.01.19.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 01:19:57 -0800 (PST) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek <trojanek@adacore.com> Subject: [COMMITTED] ada: Remove duplicated code for expansion of packed array assignments Date: Tue, 7 Nov 2023 10:19:54 +0100 Message-ID: <20231107091954.3905945-1-poulhies@adacore.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 <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> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781896590718994800 X-GMAIL-MSGID: 1781896590718994800 |
Series |
[COMMITTED] ada: Remove duplicated code for expansion of packed array assignments
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Marc Poulhiès
Nov. 7, 2023, 9:19 a.m. UTC
From: Piotr Trojanek <trojanek@adacore.com>
Expansion of assignments to packed array objects has two cases and
had duplicated code for both these cases.
gcc/ada/
* exp_pakd.adb (Expand_Bit_Packed_Element_Set): Remove code from the
ELSE branch, because it was is identical to code before the IF
statements itself.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/exp_pakd.adb | 4 ----
1 file changed, 4 deletions(-)
diff --git a/gcc/ada/exp_pakd.adb b/gcc/ada/exp_pakd.adb index 2b92c467187..19d158ffad0 100644 --- a/gcc/ada/exp_pakd.adb +++ b/gcc/ada/exp_pakd.adb @@ -1432,7 +1432,6 @@ package body Exp_Pakd is Bits_nn : constant Entity_Id := RTE (Bits_Id (Csiz)); Set_nn : Entity_Id; Subscr : Node_Id; - Atyp : Entity_Id; Rev_SSO : Node_Id; begin @@ -1454,9 +1453,6 @@ package body Exp_Pakd is -- Now generate the set reference - Obj := Relocate_Node (Prefix (Lhs)); - Convert_To_Actual_Subtype (Obj); - Atyp := Etype (Obj); Compute_Linear_Subscript (Atyp, Lhs, Subscr); -- Set indication of whether the packed array has reverse SSO