RFR: 8349835: C2: Simplify IGV property printing [v8]
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Fri Nov 21 06:51:23 UTC 2025
On Thu, 20 Nov 2025 20:57:42 GMT, Saranya Natarajan <snatarajan at openjdk.org> wrote:
>> The code that prints node properties and live range properties is very verbose and repetitive and could be simplified by applying a refactoring suggested [here](https://github.com/openjdk/jdk/pull/23558#discussion_r1950785708).
>>
>> ### Fix
>> Implemented the suggested refactoring.
>>
>> ### Testing
>> Github Actions, Tier 1-3
>
> Saranya Natarajan has updated the pull request incrementally with one additional commit since the last revision:
>
> fix for merge mistake
Thanks for addressing my comments Saranya, I just have one final suggestion, looks good otherwise.
src/hotspot/share/opto/idealGraphPrinter.cpp line 70:
> 68: print_property(_printer->C->matcher()->is_dontcare(node), "is_dontcare");
> 69: print_property(!(_printer->C->matcher()->is_dontcare(node)),"is_dontcare", IdealGraphPrinter::FALSE_VALUE);
> 70: Node* old = _printer->C->matcher()->find_old_node(node);
Suggestion:
Matcher* matcher = _printer->C->matcher();
if (matcher != nullptr) {
print_property(matcher->is_shared(node),"is_shared");
print_property(!matcher->is_shared(node), "is_shared", IdealGraphPrinter::FALSE_VALUE);
print_property(matcher->is_dontcare(node), "is_dontcare");
print_property(!matcher->is_dontcare(node),"is_dontcare", IdealGraphPrinter::FALSE_VALUE);
Node* old = matcher->find_old_node(node);
-------------
Changes requested by rcastanedalo (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26902#pullrequestreview-3491425928
PR Review Comment: https://git.openjdk.org/jdk/pull/26902#discussion_r2548723380
More information about the hotspot-compiler-dev
mailing list