RFR: 8266438: Compile::remove_useless_nodes does not remove opaque nodes

Christian Hagedorn chagedorn at openjdk.java.net
Mon May 3 15:22:51 UTC 2021


On Mon, 3 May 2021 14:50:12 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> [JDK-8255026](https://bugs.openjdk.java.net/browse/JDK-8255026) refactored the code in `Compile::remove_useless_nodes` and as a result, useless nodes are no longer removed from the `_predicate_opaqs` list. Before the [change](https://github.com/openjdk/jdk/commit/27230fae#diff-f076857d7da81f56709da3de1511b1105727032186cde4d02c678667761f46eaL382), the call to `remove_macro_node` took care of this:
> https://github.com/openjdk/jdk/blob/194bceca3a4d13d4528b86359ee9d5eead3ce7ac/src/hotspot/share/opto/compile.hpp#L676-L684
> 
> But the new code only removes nodes from the `_macro_nodes` list. Useless nodes should be removed from the `_skeleton_predicate_opaqs` list as well.
> 
> I've seen failures due to this with a change in Valhalla (where we call `remove_useless_nodes` more often) but not in mainline. I think this should still be fixed in mainline.
> 
> Thanks,
> Tobias

Looks good!

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

Marked as reviewed by chagedorn (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/3840


More information about the hotspot-compiler-dev mailing list