RFR: 8252583: Clean up unused phi-to-copy degradation mechanism [v2]
Roberto Castañeda Lozano
github.com+8792647+robcasloz at openjdk.java.net
Tue Sep 22 13:31:05 UTC 2020
On Tue, 22 Sep 2020 09:23:08 GMT, Roberto Castañeda Lozano <github.com+8792647+robcasloz at openjdk.org> wrote:
>>> Sorry, I am not sure this is better than original code where assert is in one place - in PhiNode::is_copy().
>>> The method is in .hpp file and is inlined - NULL check will be eliminated. It will only be executed in slowdebug build.
>>> May be we should "bite the bullet" and remove this method at all - we don't hit the assert in years.
>>> We can replace is_copy() check with assert in PhiNode::Ideal() - that should be enough to guarantee that we don't
>>> create Phi with NULL control edge.
>>
>> Another thing is that a node has a member called uint Node::is_Copy() const. PhiNode/Region nodes both have a member
>> callled "is_copy()". Is it intentional? IMHO, it's not good in style.
>
> Thanks Tobias and Xin for the reviews! I updated the PR for the record, even if we might end up moving the assertions
> somewhere else as per Vladimir's suggestion.
Remove unused notion of 'PhiNode-to-copy degradation', where PhiNodes can be
degraded to copies by setting their RegionNode to NULL. Remove corresponding
PhiNode::is_copy() test, which always returned NULL (false). Assert that
PhiNodes have an associated RegionNode in PhiNode::Ideal().
-------------
PR: https://git.openjdk.java.net/jdk/pull/275
More information about the hotspot-compiler-dev
mailing list