From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id B8621385041C for ; Tue, 25 Aug 2020 15:16:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B8621385041C Received: by mail-ej1-x62d.google.com with SMTP id dp2so11775814ejc.4 for ; Tue, 25 Aug 2020 08:16:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:to:cc:from :message-id; bh=Ti/zMIULHPTGJOuQ2ynegYSiUyXaahc71UJP564SRTQ=; b=cWpI33l7JRHlUhTKDsESIgx39QOCn8oQg0tB9wypOH54YDE8BB3WkC41eDlM4Rdpk+ cUxrzSA1NAMUkxKGnDriTqLcokd+3ub6kNkaTU4P9LIk4bVVY1afeuDarggW7NumQjHH ndZsK3W4dGSvGOTIKKekOrqyW8nE6Lv/SnqwMj5rLTx1QrsUYiex4fjepi3BPH5c3WM/ mD0CjDn7zj66pRAckbpZJKjhDpkdb/AI1lK65qDYG+PfLrmeutXSZzi6yA6AEf9PTQAL C2CwstPp8Nz3jwOjBFvpmXvwJ0+tbJIfw1a60B5g7JndxUhmXWt5/CJVN5kqSNKEo4Ze yQrA== X-Gm-Message-State: AOAM531navuhaINvvFE/YBVsR2jWfSP1cg5k4qKQCGNvfs1wIEHKBbS1 E4RJ7j6cnZfEcKIoS40GZw8= X-Google-Smtp-Source: ABdhPJyFeMl2BIBZ0Zm9MWkJjOr46kc4dOK7bEwey3qZE8QmUwZ3/t1/0NnXrOMy2RsvOVabAVCFaQ== X-Received: by 2002:a17:906:6895:: with SMTP id n21mr11744244ejr.155.1598368584851; Tue, 25 Aug 2020 08:16:24 -0700 (PDT) Received: from [192.168.178.32] (x4d094c7f.dyn.telefonica.de. [77.9.76.127]) by smtp.gmail.com with ESMTPSA id j3sm12953175edd.92.2020.08.25.08.16.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Aug 2020 08:16:24 -0700 (PDT) Date: Tue, 25 Aug 2020 17:16:20 +0200 User-Agent: K-9 Mail for Android In-Reply-To: <53476ebb-a9cf-ea91-909e-ffc5b47c9511@theobroma-systems.com> References: <53476ebb-a9cf-ea91-909e-ffc5b47c9511@theobroma-systems.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: Question about IPA-PTA and build_alias To: Erick Ochoa CC: GCC Development , Philipp Tomsich , =?ISO-8859-1?Q?Christoph_M=FCllner?= From: Richard Biener Message-ID: X-Spam-Status: No, score=-3.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 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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, 25 Aug 2020 15:16:28 -0000 On August 24, 2020 10:00:44 AM GMT+02:00, Erick Ochoa wrote: > > >On 24/08/2020 09:40, Richard Biener wrote: >> On Mon, Aug 17, 2020 at 3:22 PM Erick Ochoa >> wrote: >>> >>> Hello, >>> >>> I'm looking to understand better the points-to analysis (IPA-PTA) >and >>> the alias analysis (build_alias)=2E >>> >>> How is the information produced by IPA-PTA consumed? >>> >>> Are alias sets in build_alias computed by the intersections of the >>> points_to_set(s) (computed by IPA-PTA)? >>> >>> My intuition tells me that it could be relatively simple to move >>> build_alias to be an SIMPLE_IPA_PASS performed just after IPA-PTA, >but I >>> do not have enough experience in GCC to tell if this is correct=2E >What >>> could be some difficulties which I am not seeing? (Either move, or >>> create a new IPA-ALIAS SIMPLE_IPA_PASS=2E) This pass would have the >same >>> sensitivity as IPA-PTA { flow-insensitive, context-insensitive, >>> field-sensitive } because the alias sets could be computed by the >>> intersection of points-to-sets=2E >>=20 >> Both IPA-PTA and build_alias do the same, they build PTA constraint >> sets, solve them and attach points-to info to SSA names=2E Just >IPA-PTA >> does this for the whole TU while build_alias does it for a function >at a time=2E >>=20 >> So I guess I do not understand your question=2E > >Hi Richard, > >I'm just trying to imagine what a data-layout optimization would look=20 >like if instead of using the type-escape analysis we used the points-to > >analysis to find out which variables/memory locations escape and what=20 >that would mean for the transformation itself=2E What I've said before is that for the object based approach you need preci= se following of pointers which covers escape analysis already=2E For non al= located objects you need to find possible address taken and accesses=2E=20 I don't think the escape analysis included in IPA points-to analysis will = help you in the end=2E The constraint solver does not do the precise analys= is you need as well but the precise analysis will give you conservative esc= ape results=2E=20 >One of the things that I think would be needed are alias-sets=2E I >thought=20 >that build_alias was building alias sets but I was mistaken=2E However,= =20 >computing the alias sets should not be too difficult=2E > >Also continuing imagining what a data-layout optimization would look=20 >like in GCC, since IPA-PTA is a SIMPLE_IPA_PASS and if alias sets are=20 >indeed needed, I was asking what would be the reception to a=20 >SIMPLE_IPA_PASS that computes alias sets just after IPA-PTA=2E (As >opposed=20 >to a full ipa pass)=2E If you look we skip simple analysis if IPA analysis was done to not overwr= ite its results=2E So forcing it (even earlier) would make IPA analysis moo= t which would of course not be welcome=2E=20 Richard=2E=20 > > > >>=20 >> Richard=2E >>=20 >>> >>> Thanks!