RFR: 8288897: Clean up node dump code [v4]

Xin Liu xliu at openjdk.org
Thu Jul 14 07:28:06 UTC 2022


On Fri, 24 Jun 2022 09:59:55 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   implementing Christians review suggestions
>
> Otherwise, nice cleanup! I think it's the right thing to remove unused and unmaintained `dump` methods and reduce code duplication.
> 
> Have you checked that the printed node order with `dump(X)` is the same as before? I'm not sure if that is a strong requirement. I'm just thinking about `PrintIdeal` with which we do:
> https://github.com/openjdk/jdk/blob/17aacde50fb971bc686825772e29f6bfecadabda/src/hotspot/share/opto/compile.cpp#L554
> 
> Some tools/scripts might depend on the previous order of `dump(X)`. But I'm currently not aware of any such order-dependent processing. For the IR framework, the node order does not matter and if I see that correctly, the dump of an individual node is the same as before. So, it should be fine.

> @chhagedorn
> 
> > Have you checked that the printed node order with `dump(X)` is the same as before? I'm not sure if that is a strong requirement.
> 
> I did try to make sure that the output of `dump` stays equivalent. As far as I manually inspected, they are. The visit order is the same, and the same nodes are dumped.

I also verify that. root()->dump(9999) is still same. 
furthermore, I update it with colorful style. it looks pretty cool,huh? 

-    root()->dump(9999);
+    tty->print_raw("AFTER: ");
+    tty->print_raw_cr(phase_name);
+    root()->dump_bfs(9999, nullptr, "+#$S");


![Screen Shot 2022-07-14 at 12 20 46 AM](https://user-images.githubusercontent.com/2386768/178925766-00fa2ddd-4272-4a0b-a207-92f2f64bfcc3.png)

-------------

PR: https://git.openjdk.org/jdk/pull/9234


More information about the hotspot-compiler-dev mailing list