From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by sourceware.org (Postfix) with ESMTPS id EC5493858C83 for ; Tue, 8 Mar 2022 13:53:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EC5493858C83 Received: by mail-pj1-f53.google.com with SMTP id c16-20020a17090aa61000b001befad2bfaaso2477005pjq.1 for ; Tue, 08 Mar 2022 05:53:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=h17oMHl543LJMKtCRm3qxhaQPVEhA4UayoeUUrqlOdA=; b=kNnA6SIV3CZFJuXTOu2pzQJCoWDSTmg8qalA8hC0Fuopc7zHKoWoyqNxvMqh97NSjh o3rwprIWuDqQDpLzQfmKayW/uRxFHXgYTTGNrRC8X0DC2J5K/nNbFJrs4UD5efVG4ezC AsuV16aieEOnjifmbitJXrI3OrtKjKkY8cclJkCoFQ8BWNE6ZsFKhxZP9iojksKe2K1R JxjGwGj5l/FNUaTZ1Rg5QR4kNuzOXi7BO0Xq6HmXe2w7DwmFtISL0HsWCtRx7Tjau0aU 65LHlztcLQ2Ca8ecVchTYKE8i+qgxJc/BvjupqKi7xRmp2WoV8ebZfWn+Iczk9R0UvVg VFiQ== X-Gm-Message-State: AOAM5338g81arA8liBHbxfYH/tX9aQ/1y5TWigrRIArdFZL6VVjeFphu Iy9wWI3xJCWbpavqf2F49RBmKdjD3YwP1w== X-Google-Smtp-Source: ABdhPJw9Vq0/NpG7Kj2Hgp0L/vAPTXvpxFfyEgZ/ROnTnqlx0eDGIsxWGzAW5UaE9jYzJK4eFenJuw== X-Received: by 2002:a17:90a:4e8f:b0:1bf:3fee:5362 with SMTP id o15-20020a17090a4e8f00b001bf3fee5362mr4795551pjh.164.1646747621533; Tue, 08 Mar 2022 05:53:41 -0800 (PST) Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com. [209.85.215.178]) by smtp.gmail.com with ESMTPSA id h18-20020a056a00231200b004f72b290994sm3304361pfh.180.2022.03.08.05.53.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Mar 2022 05:53:41 -0800 (PST) Received: by mail-pg1-f178.google.com with SMTP id c11so4125907pgu.11 for ; Tue, 08 Mar 2022 05:53:41 -0800 (PST) X-Received: by 2002:a05:6a00:c93:b0:4f7:c76:921f with SMTP id a19-20020a056a000c9300b004f70c76921fmr8301209pfv.73.1646747620899; Tue, 08 Mar 2022 05:53:40 -0800 (PST) MIME-Version: 1.0 From: Erick Ochoa Date: Tue, 8 Mar 2022 14:53:29 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Question on updating function body on specialized functions To: gcc@gcc.gnu.org X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2022 13:53:45 -0000 Hi, I have one function (F) that has been specialized for two different calling contexts (F1 and F2) and two late SIMPLE_IPA_PASSes (A and B). Pass A changes some MEM_REFs such that the type of MEM_REF is compatible with the type of the first operand of the expression. Pass A changes both F1 and F2. I have printed the function bodies of both F1 and F2 during Pass A and everything looks correct. Pass B uses these changes. However I noticed this interesting behaviour: 1. If I fix F1 first and then F2, then pass B will see F2 correctly but some of F1 MEM_REFs will be incorrect. 2. If I fix F2 first and then F1, then pass B will see F1 correctly but some of F2 MEM_REFs will be incorrect. My question is do different specialized functions share the same trees? How would I then change the bodies of specialized functions? Thanks!