From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zmcc-3-mx.zmailcloud.com (zmcc-3-mx.zmailcloud.com [34.200.143.36]) by sourceware.org (Postfix) with ESMTPS id 177CC3860750 for ; Wed, 14 Feb 2024 21:41:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 177CC3860750 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=symas.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=symas.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 177CC3860750 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=34.200.143.36 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707946910; cv=none; b=tm5oejUiZB7K9cenB2VhXMgEzBenL4F3iqncFQaMuqiLMfl5L0BHUi2ZbUyAGRq+YPk3wGAs0kj4uTh4MdPcjRGj8HEmiswjdEPUo5KnRZTfmEFefL0MYvFK+TYeVMdfS7Y/YvqrA5WtTzWGFZ4WsHlITFWTt585v0O414QKRl4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707946910; c=relaxed/simple; bh=RsW73CRFvGDgXbc+MgRb/oXXjUBhFt5ijaylrulJauY=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=ILCoNrzNHYi+n/X4u6Jo+L0TgTQYDVJEzx6SGTtfyJa4AxVQBoOfWVZzwsu4KToSqF3Xu/siSVYQgyXuktmPHXXNRn4LGCTzUg+QMEZOpLVqoPyl7N2YzU5U6FVvENOnyLtIAThqKU9bm/UP4ERzGlz2Su6iiVuVOJEuDUuqmLk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from zmcc-3.zmailcloud.com (ec2-3-15-255-223.us-east-2.compute.amazonaws.com [3.15.255.223]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by zmcc-3-mx.zmailcloud.com (Postfix) with ESMTPS id 5E559C69C3; Wed, 14 Feb 2024 15:41:48 -0600 (CST) Received: from zmcc-3.zmailcloud.com (localhost [127.0.0.1]) by zmcc-3-mta-1.zmailcloud.com (Postfix) with ESMTPS id 45A94CE5435; Wed, 14 Feb 2024 15:41:48 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by zmcc-3-mta-1.zmailcloud.com (Postfix) with ESMTP id 359D2CE5431; Wed, 14 Feb 2024 15:41:48 -0600 (CST) Received: from zmcc-3.zmailcloud.com ([127.0.0.1]) by localhost (zmcc-3-mta-1.zmailcloud.com [127.0.0.1]) (amavis, port 10026) with ESMTP id NORmv7xJgZCV; Wed, 14 Feb 2024 15:41:48 -0600 (CST) Received: from zmcc-3-mailbox-1.zmailcloud.com (zmcc-3-mailbox-1.zmailcloud.com [172.31.28.18]) by zmcc-3-mta-1.zmailcloud.com (Postfix) with ESMTP id 1CC16CE5426; Wed, 14 Feb 2024 15:41:48 -0600 (CST) From: Robert Dubner To: "Dimitar Dimitrov" Cc: "GCC Mailing List" References: <094e01da5eb5$4c598e40$e50caac0$@symas.com> In-Reply-To: Subject: RE: New feature: -fdump-gimple-nodes (once more, with feeling) Thread-Topic: New feature: -fdump-gimple-nodes (once more, with feeling) Date: Wed, 14 Feb 2024 15:41:48 -0600 (CST) Message-ID: <0ae101da5f8e$9d94f270$d8bed750$@symas.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 X-Mailer: Zimbra 9.0.0_GA_4583 (Zimbra-ZCO/9.0.0.1939 (10.0.22621 en-US) P6478 Tdb4 R10247) Content-Language: en-us Thread-Index: AQIjFHp6vjCR1mQOhTRCOPapVEy5NQHZ+a5HsGoacHA= X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,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: I have thought about a graphical representation more than once. Heck, the connections between nodes is one of the things I needed to know in the first place. And certainly the information necessary is all there in the output I generate; I have drawn by hand pieces of the tree connections many times. But it doesn't seem to me to scale. A candidate for the absolute minimally sized executable program one can write in C and compile with GCC is void main(){} /* I didn't say it would do anything *useful* */ The generic tree for that program has in excess of fifty nodes. #include void main(){printf("hello, world\n");} has in excess of 4,800 nodes because stdio.h was brought in. Without a plotter that draws on the sides of buildings or on football pitches (you'd sit in the stands with binoculars to read the results), it's difficult for me to envision how the graphical representation could be useful. I don't claim my imagination should be the limiting factor. On the other hand, I don't think the compiler should be generating that directly, anyway. (I've managed to distract myself. Now I want to build a wheeled robot that wanders around a football pitch drawing with colored chalk dust.) My current takeaway from these responses -- thank you so much!, incidentally -- is that whatever utility I have created here would be enhanced by JSON (one and a half "votes", so far) or YAML (half a vote) output. Once the tree were available in JSON, then separate utilities to take that output and display it graphically would be straightforward. Okay then. I'll change the naming from "*gimple*" to "*generic*" as more accurate, and I'll generate JSON in addition to the other two files. Thanks again. -----Original Message----- From: Dimitar Dimitrov Sent: Wednesday, February 14, 2024 11:31 To: Robert Dubner Cc: 'GCC Mailing List' Subject: Re: New feature: -fdump-gimple-nodes (once more, with feeling) On Tue, Feb 13, 2024 at 01:46:11PM -0600, Robert Dubner wrote: ... > An example of a complete dump is available at > https://www.dubner.com/main.nodes.html. The C source code that > generated it is available at the end of > https://cobolworx.com/pages/dump-gimple-nodes.html > Hyperlinked text is useful. But I would love a graphical visualization even more, e.g. via either Graphviz or Plantuml. Regards, Dimitar