From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by sourceware.org (Postfix) with ESMTPS id 58B55389683C for ; Tue, 13 Jul 2021 09:21:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 58B55389683C Received: by mail-lf1-f47.google.com with SMTP id q16so12857075lfa.5 for ; Tue, 13 Jul 2021 02:21:37 -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:cc; bh=Vet8oZ+pL7y0dYdYWz0NxlX7Bb0mdVVHmWnSZYEeByA=; b=F9fZxZTu2BrPT1Hdlxqhg37sbJ5+FmdK6rUKP/XD2L6qUOxMKRZGZSHkRyT+qGoMWv nEqevggBpQ2is9RNskU6l50e15CHgvXSOWS9m+RcTxQz/pXQWA9gCqGbOx7YJgHm067A hnIuGKYrjZQsxLrE7/UAS4gyXIN9an8uAkt5gghSptnHv7DF7DI4VVXCZh14l+0ej6Zk B7Y6Zq5zbG525rG4zS48ed1J/gxKouM2b1oGFCXDAV5xxpqbW4CTDUxVgU2LisW9unsF iDiY3GONOVLtQjK8KdN2mx8n5hMttGZkvXaCAEG+jCnR/1Ctf0/8zNXETpH2peVG63VR 2Y9Q== X-Gm-Message-State: AOAM532/m9w/d6QElQ30WkKdCj597dCzFQpmGEEfdGpdqa0kHjTuy6kL 3kmZWzFFmEDLBmCy0JvDktJ/025KRwnXFg== X-Google-Smtp-Source: ABdhPJwWeTHIECf/Qk40Wtl/1BArlzwtS+a9LjkVJOgvylhlWKOLe78JWSy6GfUwWbpZTW6yoX7Zhw== X-Received: by 2002:a05:6512:239a:: with SMTP id c26mr2724140lfv.33.1626168095499; Tue, 13 Jul 2021 02:21:35 -0700 (PDT) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com. [209.85.167.45]) by smtp.gmail.com with ESMTPSA id a25sm1868220ljj.114.2021.07.13.02.21.35 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Jul 2021 02:21:35 -0700 (PDT) Received: by mail-lf1-f45.google.com with SMTP id a18so49067883lfs.10 for ; Tue, 13 Jul 2021 02:21:35 -0700 (PDT) X-Received: by 2002:a05:6512:3da3:: with SMTP id k35mt966235lfv.555.1626168094873; Tue, 13 Jul 2021 02:21:34 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Erick Ochoa Date: Tue, 13 Jul 2021 11:21:23 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: tree decl stored during LGEN does not map to a symtab_node during WPA Cc: Richard Biener , Jan Hubicka , GCC Development Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, MISSING_HEADERS, 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 09:21:38 -0000 Hi, Just to clarify a similar question: I am using stream_write_tree and looking at the comments it says that it is assumed that the tree T is already in the encoder cache. Does this mean that I have to use lto_symtab_encoder_t for all trees I want to store in summaries? I thought the encoder only works for trees which are stored on the symbol table. Would this mean that the only trees that can be written out to summaries are those that are declarations? Or are there any other encoders? I am trying to store SSA trees at LGEN and read them back during WPA. Thanks! Any help is appreciated. On Mon, 12 Jul 2021 at 12:55, Erick Ochoa wrote: > > > I'm not too familiar with it but I think you're supposed to stream encoded > > symtab references during LGEN/WPA, > > Thanks Richard, this happened to be the solution. I am now using > lto_symtab_encoder_t to encode the declarations during LGEN and decode > them during WPA. > > Are there any more limitations of using stream_write_tree that one > should be aware of? Now I am looking into storing trees of the type > STRING_CST and I think this might be causing me a problem at WPA time. > I think it segfaults at the moment of creating the process, but I > still need more time to investigate. Perhaps you might know if storing > STRING_CST trees has to be handled in a special way? Not sure if it > also has something to do with LTO file sections. The tree is used to > initialize a global static variable. > > Thanks!