RFR: 8369002: Extract the loop->is_member(get_loop(get_ctrl(node))) pattern in a new function [v3]
duke
duke at openjdk.org
Fri Nov 14 07:23:05 UTC 2025
On Thu, 13 Nov 2025 10:36:25 GMT, Anton Seoane Ampudia <aseoane at openjdk.org> wrote:
>> This PR adds a "shorthand" for the common `loop->is_member(get_loop(get_ctrl(node)))` pattern in loop optimizations.
>>
>> In PhaseIdealLoop, there is already an `is_member` function that checks if a node is a (nested) member of an IdealLoopTree. In a similar fashion, this changeset adds a `ctrl_is_member` that aims to simplify the common pattern of:
>>
>> Node* node_ctrl = get_ctrl(node);
>> if (loop->is_member(get_loop(node))) { ... }
>>
>>
>> This hopes to provide a bit more readability and code conciseness in such a common operation.
>>
>> **Testing:** passes tiers 1-3
>
> Anton Seoane Ampudia has updated the pull request incrementally with one additional commit since the last revision:
>
> Review comments: nit
@anton-seoane
Your change (at version c343e2c5c9aee09320ce12f64cd3ee06b1af9970) is now ready to be sponsored by a Committer.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28259#issuecomment-3531260634
More information about the hotspot-compiler-dev
mailing list