From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 488203858D1E for ; Mon, 26 Jun 2023 18:09:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 488203858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687802942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ekFawCXEwv6ySzbQi/C9CP3jLAEUfHJWOOdj21CjNt0=; b=NGp2eLSHPrvVUoIvNMBAhcuWfh5ETpGRs9VJOut20r8aFaXDHiY1m/sn6c43/JBb+TqwRh ORAMZEqxEPin+gnvR2jDaB4Z8zQx2W3rQLfM7EUGbH5o7L+SFhR2f+IQ6EobTkZJlMKpvg px8Dj16hYbjo3bv/sYWti0gK9KQCl50= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-553-Vecsk7ZKOeO1P9VeU2wVbA-1; Mon, 26 Jun 2023 14:09:01 -0400 X-MC-Unique: Vecsk7ZKOeO1P9VeU2wVbA-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-635e0028b24so13520886d6.0 for ; Mon, 26 Jun 2023 11:09:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687802941; x=1690394941; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ekFawCXEwv6ySzbQi/C9CP3jLAEUfHJWOOdj21CjNt0=; b=JKBJA3dM5ftSVBGcIeQB5uLDu8HhbU848fDMkHU4sdRLUJKZvdvWq3rkFPmtD/wT48 claGPRUC8r0iclRo1WXnGCyfMhipXa4MWZ45sgFpr/zuKWxj2/BLue3oGNWgWk80Sixi YseBZUFg8AMOdlSfq+9m3wq+cWqGp8rx3nhQszU3E8HjZk2jmkGgIaRGShMt1oLxl6Z2 CbhTGjfw/tYdG8OrtOTKruI0tGSoSQmKcDXhS7KlJvPMdzyBMELuncTcCQEtk5N3WWsy 4VZ4RjhObUuuJm3uWF2r/fstx98WAo1Kz3Rp+6Av2UaZ4H3Oo7+Xtfu2lpmNXNcf0c1I qhBg== X-Gm-Message-State: AC+VfDzBIvgeoDLqe8pawHXWtFmaSoIaDnjIhh3a89PhhUvvfKigK+l1 gYncxZQlqiuVwiA7RMk8BIX91rJl+9UZzhTJ4a3m6JzA55x9ZI40EvC5tL9aNdey9uvYWze3g+F U5xtaq7g= X-Received: by 2002:a05:6214:411c:b0:635:e0dd:db42 with SMTP id kc28-20020a056214411c00b00635e0dddb42mr3608305qvb.27.1687802941308; Mon, 26 Jun 2023 11:09:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Mu320UwKO+nzjVpYiZVpAp5QKbY0dVuZKMl/lhkxYRDwkpf7ICGZd1THQqGfxK9q89hZBSg== X-Received: by 2002:a05:6214:411c:b0:635:e0dd:db42 with SMTP id kc28-20020a056214411c00b00635e0dddb42mr3608297qvb.27.1687802941075; Mon, 26 Jun 2023 11:09:01 -0700 (PDT) Received: from t14s.localdomain (c-76-28-97-5.hsd1.ma.comcast.net. [76.28.97.5]) by smtp.gmail.com with ESMTPSA id qf22-20020a0562144b9600b0062deea179aesm3411862qvb.22.2023.06.26.11.09.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 11:09:00 -0700 (PDT) Message-ID: Subject: Re: Mapping of TREE_CODE to tree_node From: David Malcolm To: Aaron Lorey , gcc@gcc.gnu.org Date: Mon, 26 Jun 2023 14:08:59 -0400 In-Reply-To: References: User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, 2023-06-26 at 18:59 +0200, Aaron Lorey via Gcc wrote: > Hello, >=20 > this is the first time I am writing to a mailing list. I've tried > researching the normal procedure but nothing special seems to be > required. >=20 > I'm currently trying to do a complete graph-discovery of GCC's symtab > / > tree_nodes to dump the full internal representation of the > compilation > unit. Gitlab: https://gitlab.com/graph-prog/code-database >=20 > It is not exceptionally heavy but also not very easy to serialize the > internal state to disk. I think this task was simply not considered > in the > design. >=20 > Reason for writing to the mailing list are the troubles in connecting > the > TREE_CODE enumeration to the appropriate struct tree_node memory > layout > without guessing. >=20 > Can you provide a mapping of TREE_CODE to tree_node memory layout? I don't know that such a mapping exists directly, but have a look at the functions "tree_code_size" and "tree_size" defined in gcc/tree.cc. You might also find the LTO streaming code of interest; see gcc/lto- streamer-{in,out}.cc Hope this is helpful Dave