RFR: 8311125: Remove unused parameter 'phase' in AllocateNode::Ideal_allocation [v2]

Vladimir Kozlov kvn at openjdk.org
Fri Jun 30 22:32:53 UTC 2023


On Fri, 30 Jun 2023 19:43:06 GMT, Xin Liu <xliu at openjdk.org> wrote:

>> There are 2 overloaded AllocateNode::Idea_allocation() in graphkit.cpp.
>> One of them never uses 'phase' in the pattern-matching effort.
>> 
>> C++ compiler may emit a warning for the unused parameter. We will need to take care of it if we treat 
>> warning as error. It also unnecessarily couple CheckCastPP with PhaseValue. In some places, we have to
>> gain the instance for it. 
>> 
>> I would like to remove 'phase' as parameter. This is a pure clean-up. The other Idea_allocation() does 
>> use PhaseValue* phase to get constant nodes, so leave it alone.
>
> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Clean up useless 'phase' parameter more.

Looks good.

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

Marked as reviewed by kvn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/14719#pullrequestreview-1507948930


More information about the hotspot-compiler-dev mailing list