Skip to content

Commit

Permalink
Do not emit Profiled Parse Predicate if -XX:-UseLoopPredicate which d…
Browse files Browse the repository at this point in the history
…isables Loop Predication completely
  • Loading branch information
chhagedorn committed Nov 16, 2023
1 parent 92375b0 commit 09c0265
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/hotspot/share/opto/graphKit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4061,10 +4061,11 @@ void GraphKit::add_parse_predicate(Deoptimization::DeoptReason reason, const int
void GraphKit::add_parse_predicates(int nargs) {
if (UseLoopPredicate) {
add_parse_predicate(Deoptimization::Reason_predicate, nargs);
if (UseProfiledLoopPredicate) {
add_parse_predicate(Deoptimization::Reason_profile_predicate, nargs);
}
}
if (UseProfiledLoopPredicate) {
add_parse_predicate(Deoptimization::Reason_profile_predicate, nargs);
}

// Loop Limit Check Predicate should be near the loop.
add_parse_predicate(Deoptimization::Reason_loop_limit_check, nargs);
}
Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/share/opto/loopnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1053,9 +1053,9 @@ bool PhaseIdealLoop::create_loop_nest(IdealLoopTree* loop, Node_List &old_new) {

if (UseLoopPredicate) {
add_parse_predicate(Deoptimization::Reason_predicate, inner_head, outer_ilt, cloned_sfpt);
}
if (UseProfiledLoopPredicate) {
add_parse_predicate(Deoptimization::Reason_profile_predicate, inner_head, outer_ilt, cloned_sfpt);
if (UseProfiledLoopPredicate) {
add_parse_predicate(Deoptimization::Reason_profile_predicate, inner_head, outer_ilt, cloned_sfpt);
}
}
add_parse_predicate(Deoptimization::Reason_loop_limit_check, inner_head, outer_ilt, cloned_sfpt);
}
Expand Down

0 comments on commit 09c0265

Please sign in to comment.