From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id 421C43983837; Fri, 9 Jul 2021 09:49:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 421C43983837 Received: by mail-ej1-x635.google.com with SMTP id ga14so120040ejc.6; Fri, 09 Jul 2021 02:49:49 -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=o9KHHlZB21B2eJkFtvwoOzmrro8nFqkiwfnzG251u/Y=; b=uhopsYfpMsP9InP5c7larR9R/dOJPJJmiQWfx0j2V450hWCWXEbKSH+ga5u1Deoqfn u6yU/yj00zJBR5do7lZ2oj0JYUN89kzpXEpczhXguwxUar6Cx3Bi5OJrLQpDIURLJouU NzNl7esbNaAt4pz8iXdof3/BtwfB8SwACuHB0sTON1SlK4gmd9IT/WEdsSmmUs+qcbzC wmunP0J0lblZ0ywpKuUxO5VwebSxoiGCsquMr8G0sht1uldFxicQOykT47nM54ZSkiDf BiKCdbXqUrUGUUR3lBcwVRz22OV8QoyUlvS1mlAV88hDuD6dKJTfMCaZpB+iycGkmrCr lZIg== X-Gm-Message-State: AOAM533eJaTWgGfPfFvuGQYv8bRpIMH43LHJO9sHqmPfUgO3lgFtnOT5 f3XVgE0B/epRFUaEHiIUc5nyfkKBA9E6Q3fn/ImTaMFJ X-Google-Smtp-Source: ABdhPJxEValI5NKS0ye3Z7SFnVQ9YhDUEJHc1VGEtQIDkoRDmie96q9npn7CftSH1ozSUVP2L9auFLMGJ/PYVkkEPpU= X-Received: by 2002:a17:907:9812:: with SMTP id ji18mr37098955ejc.138.1625824188309; Fri, 09 Jul 2021 02:49:48 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Fri, 9 Jul 2021 11:49:37 +0200 Message-ID: Subject: Re: tree decl stored during LGEN does not map to a symtab_node during WPA To: Erick Ochoa , Jan Hubicka Cc: GCC Development Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.6 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.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: Fri, 09 Jul 2021 09:49:57 -0000 On Fri, Jul 9, 2021 at 9:52 AM Erick Ochoa via Gcc wrote: > > Hi, I noticed this is also happening also for local variables. Again, > storing tree declarations on a summary during LGEN and then at WPA > time reading from those summaries. I can print the declaration, but > when I try to look for its node in the symtab I get NULL as the return > value. > > Any help is appreciated. Thanks! I'm not too familiar with it but I think you're supposed to stream encoded symtab references during LGEN/WPA, the decls are subject to symtab merging and I'm not quite sure that happens when you read your summaries. Note locals do not have carpool nodes. Richard. > On Wed, 7 Jul 2021 at 11:27, Erick Ochoa wrote: > > > > Hi, > > > > I am saving some tree declarations during LGEN that I will be later > > analyzing at WPA time. I am able to read the decl from my summaries > > and print it at WPA time. It corresponds to a global variable. > > However, whenever I use symtab_node::get (decl) during WPA time I keep > > getting NULL. > > > > Does anyone know why that might be the case? Is it possible that other > > optimizations are rewriting global variables during LGEN (or prior > > WPA)? The variable I am looking at is a static const char typeinfo > > name for a class in the program I am analyzing. I don't think this is > > an issue since other type info names have an associated symtab_node. > > > > Thanks!