From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by sourceware.org (Postfix) with ESMTPS id 9E6743858284 for ; Fri, 10 Nov 2023 13:31:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9E6743858284 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9E6743858284 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::134 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699623099; cv=none; b=gSftEPamRke/aQnJS/fuvZqFy+AwbLkrLK4IjPcIekpt3jvC0lhxAFTuAplx9gAAt/g1FzHIzDNQHi3Bu0A+usJzVj7230E5OQa4JT3ILItnUmzy6oalroEDJWQNldqxS/nmhhBdVNrGF/Y/IA0t2kvPBXCCCln/lR5jp78KBQY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699623099; c=relaxed/simple; bh=KaTPjIsVImTPOAgZKA60GFeya9AhhCro6WjcUV2oS/k=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=S7EGVFZDqM0LLAZFDHagxXh051DMTdu/wC6Vbp8NyiD0pJbzGQvR0pqjKKxsNxk2oKx5tL4/4qaWMKwi6Q7mnhhW36c12M7J1hf+mxY/3ZSEUQkBKzRIro/pxs6ZlgfkREvjB/sxYa+kQI+YQ42nd+EF6i9mLeMcF8rCbyQmMEY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-507c5249d55so2921643e87.3 for ; Fri, 10 Nov 2023 05:31:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699623096; x=1700227896; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7FwS1udcx6pbHXjepPKEZBrztlimzlxTNxqvKOiSaCQ=; b=cOGQ6r8YNiixBhCb/LiIZHNT5krvzSs/cTJ0aE+svygRR2LBUHoOmcMlkTxwKU7FmK PbbVcBXIPlaZYf3JYEal2/9Xcb8mw+MYGTZ4ZgVXGpY459RUUykmyeQxziQ5h73h8YCW u8WztY3OQbAok40cZ2uYWkBkvxOgeR1ZXnwSiML6qdevD4o1fo9dpqK9INb/5rCVbdcO e4v5ttRhwiHZj5XG8/39PV/jCbhcuB7AhOOOi3+4Q+2vSzENHgFeeAoL7tCUIEZIeQO5 vdd0r/TFu+a5xo/gZUefNseFKhWmQaZpbDjb3GtYaaWHBynNDuFhRCKXYz2vM32k8P8A 9rAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699623096; x=1700227896; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7FwS1udcx6pbHXjepPKEZBrztlimzlxTNxqvKOiSaCQ=; b=VUkZthkABE5bTg4GUlEq2IGp1/jrt2luS6QVlLht3apa9mlhcHSZ/diAE22GfBI7o6 3tU4wLhw0s0hLNzULeBDoNyPDMJowf2BgNjSTHdRS4x5Lpc0FXiYe8ARuebUnXP510rG x1kNHZijU3cEsX967VIFsBdcQKKN4xfURo5XWb4QvCtCavoz0kKZ3G/cPT9wuqFv9Y9g W6SV67nRs7x5CuDjtqsKHYDEjhRZWvxrXRQT2dckGgz9UKx2fi93tlerS4GOHiDcb5l7 s8//zuWTouvtgIhX2FmUR09iUVsWk2+HHC2QUzoNO+bZBjePmepDYsgmC0LchXbE9V9N qiUA== X-Gm-Message-State: AOJu0Yxg/9AMXosT8x0rfipCoD9AZ5nYd0+LBOzB+ID434Mi0U4UCyaR WZmTQyYWLKW3ZIp40sUrvLbGmEAkdqGttC2WP8I= X-Google-Smtp-Source: AGHT+IEGNjYWniPqZmEVEvNVDzek3oguIKDSZdB4J4ioldR4ejGDmgK85BeGbqpqgI+l+mzkaaKcXpIPhKpUcJBGxqo= X-Received: by 2002:ac2:4206:0:b0:507:9ff6:75b6 with SMTP id y6-20020ac24206000000b005079ff675b6mr4114450lfh.50.1699623096064; Fri, 10 Nov 2023 05:31:36 -0800 (PST) MIME-Version: 1.0 References: <4845410.GXAFRqVoOG@fomalhaut> In-Reply-To: <4845410.GXAFRqVoOG@fomalhaut> From: Richard Biener Date: Fri, 10 Nov 2023 14:31:23 +0100 Message-ID: Subject: Re: [PATCH] Handle constant CONSTRUCTORs in operand_compare To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 List-Id: On Fri, Nov 10, 2023 at 12:17=E2=80=AFPM Eric Botcazou wrote: > > Hi, > > this teaches operand_compare to compare constant CONSTRUCTORs, which is q= uite > helpful for so-called fat pointers in Ada, i.e. objects that are semantic= ally > pointers but are represented by structures made up of two pointers. This= is > modeled on the implementation present in the ICF pass. > > Bootstrapped/regtested on x86-64/Linux, OK for the mainline? OK. > > 2023-11-10 Eric Botcazou > > * fold-const.cc (operand_compare::operand_equal_p) : > Deal with nonempty constant CONSTRUCTORs. > (operand_compare::hash_operand) : Hash DECL_FIELD_OF= FSET > and DECL_FIELD_BIT_OFFSET for FIELD_DECLs. > > > 2023-11-10 Eric Botcazou > > * gnat.dg/opt103.ads, gnat.dg/opt103.adb: New test. > > -- > Eric Botcazou