RFR: 8280686: Remove Compile::print_method_impl [v2]
Xin Liu
xliu at openjdk.java.net
Wed Jan 26 20:39:04 UTC 2022
On Wed, 26 Jan 2022 12:26:38 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use default argument for function overload.
>>
>> This patch further simplify Compile::print_method. there's only one
>> version of it with an optional argument Node*.
>
> src/hotspot/share/opto/compile.cpp line 4821:
>
>> 4819: }
>> 4820:
>> 4821: void Compile::print_method(CompilerPhaseType cpt, Node* n, int level) {
>
> Could we also turn `Node* n` into a parameter with default argument `NULL`? Then we can merge both `print_method` methods into one.
yes, it's possible. all we need to do is to flip the order from "Node* n, int level" to "int level, Node* n = NULL"
-------------
PR: https://git.openjdk.java.net/jdk/pull/7229
More information about the hotspot-compiler-dev
mailing list