From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) by sourceware.org (Postfix) with ESMTPS id 854783886C65 for ; Tue, 13 Jul 2021 10:50:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 854783886C65 Received: by mail-lj1-f179.google.com with SMTP id r20so29256807ljd.10 for ; Tue, 13 Jul 2021 03:50:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/dqtTYWREO3Apkmw26JGvOli95/lV0P7ZLjpkPeneuw=; b=lPRe/RH8LcxW7IyJE0K6vJiW9JSQJDrNRlgSaME6Fx45O4Gla4KHE+NaXlwRzUj4rE 4Z29s/n00mcNSzZN6JpmdwsFKP7A2WfNMyCi3v3owYrOijl76et9HFhHkcA0TgYaUKp+ +iud0PMfkuZ3ENXSEWFLe/CakwpbnOkIdZeXUi8D8k8BauT8ouUvtdK7+C4EAE5H27qm obYBWxon0yQQmAFxPEnrhAnqVNeCbONtUfXKEYAg9ciXQ5oRgWEormSngj5kHEeOHVxQ T87Zhjaxhi1mCPf8KO0HGJUYwIkNlIp9436xuitV1W3fMYxrU6K5Wms3YpAyDzozbjdI cJzg== X-Gm-Message-State: AOAM5332dGGe3kdcrl0fsK8bjTqJYZdKXjrLVafE9BcIqgWXiASYSMgV VHQNI3GQ8jndJsg4W6MKocZ+/Y6Nc7jAjQ== X-Google-Smtp-Source: ABdhPJxiRm2DfmG/M6U+RkcA/HNyanKo/+LFizq26Q0xeIQ79nAvR6pvc8pbPOE1KU6/1f37WTzYIA== X-Received: by 2002:a2e:900c:: with SMTP id h12mr3569988ljg.240.1626173403042; Tue, 13 Jul 2021 03:50:03 -0700 (PDT) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id e2sm555027ljg.91.2021.07.13.03.50.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Jul 2021 03:50:02 -0700 (PDT) Received: by mail-lj1-f180.google.com with SMTP id b40so29246513ljf.12 for ; Tue, 13 Jul 2021 03:50:01 -0700 (PDT) X-Received: by 2002:a05:651c:178f:: with SMTP id bn15mr3679309ljb.448.1626173401675; Tue, 13 Jul 2021 03:50:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Erick Ochoa Date: Tue, 13 Jul 2021 12:49:50 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: tree decl stored during LGEN does not map to a symtab_node during WPA To: Richard Biener Cc: Jan Hubicka , GCC Development Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no 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@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, 13 Jul 2021 10:50:05 -0000 > There are entities, like SSA names and STRING_CSTs which are specially > encoded and if you stream those in your LGEN data you have to set up > appropriate encoders. In general streaming arbitrary trees isn't the > best thing to do, usually you're interested in specific pieces only. That's > especially true for things "local" to a function (like SSA names), I think > existing IPA passes only stream encoded references to global entities > (or parameters) and all "local" info is some pass specific data streamed > as raw data, not trees. Thanks! > > Why do you want to stream SSA trees for example? > I am working on a prototype for a points-to analysis where the implementation is an IPA_PASS as opposed to a SIMPLE_IPA_PASS. It is still somewhat early in the prototype implementation stages but I would like to have SSA trees at WPA time as a way to map constraints variables back to Gimple. The idea is to generate most constraints at LGEN time (some will have to be updated) and solve them at WPA time. Do you have any other suggestions on how to map constraint variables (similar to the index in the varinfo_t array) back to Gimple (but now as an IPA_PASS)? We have had similar discussions before, but now I am looking at things more concretely, from the point of view of: how exactly does one map the analysis back to Gimple while staying within what is possible in the LTO framework? I do have a pass-specific data structure, but it contains references to trees. It is similar to varinfo_t, which has a decl. I also have another tree for expressions (the concrete use case right now is having a global variable being assigned to a string literal), and a field for ssa variables, which was intended to store a reference to the corresponding tree. Again, as a way to map back the constraint variable to Gimple. > There can be no > references to those from other IPA entities? I don't follow this question. I think this may be a statement and not a question. Please clarify this for me, but perhaps the following might answer: Since I am working on an interprocedural analysis, SSA variables may point to abstract memory locations allocated in different functions. So I need to have a link between SSA variables and whatever memory locations they might point to.