From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by sourceware.org (Postfix) with ESMTPS id 3546B385782C for ; Wed, 14 Feb 2024 07:40:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3546B385782C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=linux.intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3546B385782C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707896451; cv=none; b=tGz1mwAkyBOWXd078/iFTEcrUQOWj8rpBTAvFDFxlCEeIuzVmCEXB3BHQCqudyuNib2BcGyXRoigJJTKQjTxGHkgOlhoz2k58hnkEy1TSYxSAQk72B6hkmbW02LQETyNZvY+hxz0N75bMWL2pSPw5aNS55h0Zr6HQQ3GJ3BDoKE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707896451; c=relaxed/simple; bh=LKBvbw1FDxYKBmCDeBd6jdg/COsFsYhdVtmlEVTB3ds=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=I6dFAOILh+5cgkIOFwqNRQFicMovTWkNKhq7kVZFHp4JXiSGlBuL1QEgR20ABFZJkHRHx6sZ5LllkXjcH8AXCPNwS1gIk+wytZt+0CcLX4RBhv4eWqO9OG+mnZa5jYJ8K3w5k4fBtMvMwMwRcJtX9KLORlOh7Z5ld/v6Op/hRJ0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707896449; x=1739432449; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=LKBvbw1FDxYKBmCDeBd6jdg/COsFsYhdVtmlEVTB3ds=; b=mpDbMr0FRylEklAU9xSpRL1H104r3hibR8lZSabnDrwhnUFVzdbvYtf1 jQ9OcxSLAJOtjffpATFF+FvWtPwVXfs06qr0lSuOfvW0cp5lodoU0Ad5s BFDFJDe3/tePv7HdEb5vbWFYPcBckQiHG9mt+9Po/4WTclTna8HMylodo zDtm0Nul9t31Z6ixODqL3LmHmMUXPVyJ24nNkj0Me+3d4DB/+DjMmgx8A YxcPFj06ZL36xcqG9apgCadMqp6FW2mDXM0B5QAvKSyxbLRDwxmpqpWBD UYLgvP/hn33iq3jYgOHfocrchYjmH+UmZcNGgBvOME7MQ1P/nqYFtvv/y g==; X-IronPort-AV: E=McAfee;i="6600,9927,10982"; a="5762611" X-IronPort-AV: E=Sophos;i="6.06,159,1705392000"; d="scan'208";a="5762611" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2024 23:40:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,159,1705392000"; d="scan'208";a="3090883" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.54.38.190]) by fmviesa010.fm.intel.com with ESMTP; 13 Feb 2024 23:40:48 -0800 Received: by tassilo.localdomain (Postfix, from userid 1000) id 87D5A300B65; Tue, 13 Feb 2024 23:40:47 -0800 (PST) From: Andi Kleen To: Robert Dubner Cc: "'GCC Mailing List'" Subject: Re: New feature: -fdump-gimple-nodes (once more, with feeling) In-Reply-To: <094e01da5eb5$4c598e40$e50caac0$@symas.com> (Robert Dubner's message of "Tue, 13 Feb 2024 13:46:11 -0600 (CST)") References: <094e01da5eb5$4c598e40$e50caac0$@symas.com> Date: Tue, 13 Feb 2024 23:40:47 -0800 Message-ID: <87v86rwl1c.fsf@linux.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,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: Robert Dubner writes: > There didn't seem to be any such functionality in GCC. I found a routine > in print-tree.cc which printed out a single node, but I needed to > understand the entire tree of nodes for a function. FWIW the standard way to do this is to run the compiler in gdb with the .gdbinit in the object directory, set a suitable break point and then use pt etc to dump the trees. It prints all the fields and you can use the gdb command line to explore further. > ***********************************This is NodeNumber0 > (0x7f12e13b0d00) NodeNumber0 > tree_code: function_decl > tree_code_class: tcc_declaration My suggestion if you go this route would be to generate some standard format like YAML or JSON that other tools can easily parse. -Andi