RFR: 8343148: C2: Refactor uses of "PhaseValue::*con*() + PhaseIdealLoop::set_ctrl()" into separate method

Vladimir Kozlov kvn at openjdk.org
Tue Nov 5 18:24:29 UTC 2024


On Fri, 1 Nov 2024 16:04:38 GMT, theoweidmannoracle <duke at openjdk.org> wrote:

> This patch introduces the methods `PhaseIdealLoop::intcon` and `PhaseIdealLoop::longcon` which are wrappers for:
> 
> 
> ConINode* node = _igvn.intcon(i);
> set_ctrl(node, C->root());
> 
> 
> and
> 
> 
> ConLNode* node = _igvn.longcon(i);
> set_ctrl(node, C->root());
> 
> 
> Occurrences of this pattern in loopnode.cpp were replaced with the appropriate call to the new methods.

Do we have other places (not new constant node) where we set Root as control?
May be we can add `set_root_as_ctrl(n)` method in `loop node.hpp` in such case.

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

PR Review: https://git.openjdk.org/jdk/pull/21836#pullrequestreview-2416390797


More information about the hotspot-compiler-dev mailing list