From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id 446083858416 for ; Wed, 12 Jan 2022 09:45:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 446083858416 Received: by mail-wr1-x435.google.com with SMTP id d19so3203045wrb.0 for ; Wed, 12 Jan 2022 01:45:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EkigAsOCh/8ykSbGDzl1fNvjwe6wVl6M00xxQQPvWmI=; b=mxPhsDmeK8XY4H2X5PVuzqrapzz/7Qu3avwPLIklxMurN2zIivr8NVFSrrnEWd/j5c oFXacLZXcKhArYldFU4385twL8Yj1twgM4drlO0wS1lSwMWPxZUZMYbKid7jGZgCnk/7 4TnYU4Lu7892bniI8hk39NwbImSyW1eRX9IVy+4F/U9srPrH0qJAb9HxZiSxvGCEPcJM 3f7EMdoN0CTTqGnFA8TMqOijezUQfRK0lZfSC1i3SGFujSB4qgFjWCJP/b8IMumSx03r Xc5Mn9d/PK3YnJiFs+zoDgBT1r7LYxdniwxcDaY6rGTyfTJGibGXTGbt8aNI8hW9bBKW ukQQ== X-Gm-Message-State: AOAM531M0aGXO+YP0ABZlxCRcFIMXaxAUwVynrdUJzs4KDtu68Mab3hx uoWGxHOSk2GnFrtMX5LHqJZsbQ== X-Google-Smtp-Source: ABdhPJyDgrdS5ag82kaQiMA+RK/58QAozGH7cB/GdALmRvnv1V4cw53zIl2sUYP5PmcL4J5orJgbVQ== X-Received: by 2002:adf:fa85:: with SMTP id h5mr7406248wrr.681.1641980703314; Wed, 12 Jan 2022 01:45:03 -0800 (PST) Received: from fomalhaut.localnet ([2a01:e0a:41b:84f0:cf71:f5e0:b050:bede]) by smtp.gmail.com with ESMTPSA id t5sm9863705wrw.12.2022.01.12.01.45.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 01:45:03 -0800 (PST) From: Eric Botcazou X-Google-Original-From: Eric Botcazou To: Martin Jambor Cc: gcc-patches@gcc.gnu.org Subject: Re: [patch] Fix reverse SSO issues in IPA-SRA Date: Wed, 12 Jan 2022 10:45:01 +0100 Message-ID: <1805613.tdWV9SEqCh@fomalhaut> In-Reply-To: References: <1805634.tdWV9SEqCh@fomalhaut> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jan 2022 09:45:05 -0000 > Thanks for the fixes, the forgotten duplication and streaming were quite > embarrassing, but one reason is that there are few reverse SSO testcases > in the suite. Would it be difficult to add some covering the issues you > fixed? No, I think I should be able to cover 3 out of the 4 changes, see below. > ...is this strictly necessary? I know it is inconsistent but the > certain flag is fairly special. More importantly... No strong opinion, but that's really inconsistent... > > @@ -3349,6 +3346,7 @@ pull_accesses_from_callee (cgraph_node *caller, > > isra_param_desc *param_desc,> > > copy->type = argacc->type; > > copy->alias_ptr_type = argacc->alias_ptr_type; > > copy->certain = true; > > > > + copy->reverse = argacc->reverse; > > > > vec_safe_push (param_desc->accesses, copy); > > > > } > > > > else if (prop_kinds[j] == ACC_PROP_CERTAIN) > > ...earlier in the function, there is a check doing: > > if (argacc->alias_ptr_type != pacc->alias_ptr_type > > || !types_compatible_p (argacc->type, pacc->type)) > > return "propagated access types would not match existing ones"; > > Will the types_compatible_p catch the case when one type is a > reverse-SSO and the other is not? If not, we probably need to check > that the flags are the same too. That's the change I don't know how to cover and I agree that the check looks in order, but I presume that the flag still needs to be copied onto "copy"? -- Eric Botcazou