RFR: 8347481: C2: Remove the control input of some nodes

Vladimir Kozlov kvn at openjdk.org
Wed Jan 15 18:27:36 UTC 2025


On Sun, 12 Jan 2025 13:43:44 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

> Hi,
> 
> While working on [JDK-8347365](https://bugs.openjdk.org/browse/JDK-8347365), I noticed that there are some nodes that have their control inputs being set in a seemingly erroneous manner. This patch removes the control inputs for those nodes.
> 
> Please review this PR, thanks a lot.

src/hotspot/share/opto/movenode.hpp line 90:

> 88: class CMovePNode : public CMoveNode {
> 89:   public:
> 90:   CMovePNode(Node* bol, Node* left, Node* right, const TypePtr* t) : CMoveNode(bol, left, right, t) {}

I looked on history and this control setting was added at the very beginning.
May be it was done to avoid bypassing safepoints where oops could be modified (objects moved) and result of `CMoveP` before and after safepoint will be different.
I would be careful about changing it and `CMoveN`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23055#discussion_r1917156150


More information about the hotspot-compiler-dev mailing list