From 7fe4ea00313cea0be73378ed348c345f36647427 Mon Sep 17 00:00:00 2001 From: Christian Hagedorn Date: Thu, 24 Oct 2024 12:54:03 +0200 Subject: [PATCH] improve comments --- src/hotspot/share/opto/predicates.cpp | 10 +++++----- src/hotspot/share/opto/predicates.hpp | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/hotspot/share/opto/predicates.cpp b/src/hotspot/share/opto/predicates.cpp index a44c17f1914a2..084a5c91ff08a 100644 --- a/src/hotspot/share/opto/predicates.cpp +++ b/src/hotspot/share/opto/predicates.cpp @@ -138,16 +138,16 @@ bool RuntimePredicate::is_predicate(Node* node, Deoptimization::DeoptReason deop return RegularPredicateWithUCT::is_predicate(node, deopt_reason); } -// Rewire any control inputs from the old Assertion Predicates above the peeled iteration down to the initialized -// Assertion Predicates above the peeled loop. +// Rewire any non-CFG nodes dependent on this Template Assertion Predicate (i.e. with a control input to this +// Template Assertion Predicate) to the 'target_predicate' based on the `data_in_loop_body` check. void TemplateAssertionPredicate::rewire_loop_data_dependencies(IfTrueNode* target_predicate, - const NodeInLoopBody& _data_in_loop_body, + const NodeInLoopBody& data_in_loop_body, PhaseIdealLoop* phase) const { for (DUIterator i = _success_proj->outs(); _success_proj->has_out(i); i++) { Node* output = _success_proj->out(i); - if (!output->is_CFG() && _data_in_loop_body.check(output)) { + if (!output->is_CFG() && data_in_loop_body.check(output)) { phase->igvn().replace_input_of(output, 0, target_predicate); - --i; // correct for just deleted output + --i; // account for the just deleted output } } } diff --git a/src/hotspot/share/opto/predicates.hpp b/src/hotspot/share/opto/predicates.hpp index 64d8f73c20720..93125f9c1bf25 100644 --- a/src/hotspot/share/opto/predicates.hpp +++ b/src/hotspot/share/opto/predicates.hpp @@ -399,9 +399,8 @@ class TemplateAssertionPredicate : public Predicate { return _success_proj; } - void rewire_loop_data_dependencies(IfTrueNode* target_predicate, const NodeInLoopBody& _data_in_loop_body, + void rewire_loop_data_dependencies(IfTrueNode* target_predicate, const NodeInLoopBody& data_in_loop_body, PhaseIdealLoop* phase) const; - static bool is_predicate(Node* node); };