JDK-8240223 : Use consistent predicate order in and with PhaseIdealLoop::find_predicate
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,12,13,14,15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-02-28
  • Updated: 2020-06-09
  • Resolved: 2020-03-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 14 JDK 15
11.0.8-oracleFixed 13.0.4Fixed 14.0.2Fixed 15 b13Fixed
Related Reports
Relates :  
Description
The predicates are added and exists in the order given by GraphKit::add_predicate.

PhaseIdealLoop::find_predicate searches for them in a different order. This doesn't really matter, but it would be nice if this code were consistent with other code looking for these predicates.

Node* PhaseIdealLoop::find_predicate(Node* entry) {
  Node* predicate = NULL;
  predicate = find_predicate_insertion_point(entry, Deoptimization::Reason_loop_limit_check);
  if (predicate != NULL) { // right pattern that can be used by loop predication
    return entry;
  }
  if (UseLoopPredicate) {
    predicate = find_predicate_insertion_point(entry, Deoptimization::Reason_predicate);
    if (predicate != NULL) { // right pattern that can be used by loop predication
      return entry;
    }
  }
  if (UseProfiledLoopPredicate) {
    predicate = find_predicate_insertion_point(entry, Deoptimization::Reason_profile_predicate);
    if (predicate != NULL) { // right pattern that can be used by loop predication
      return entry;
    }
  }
  return NULL;
}
Comments
Fix request (13u) I'd like port it to 13u as well. Patch applies cleanly, tier1 finished fine.
09-06-2020

Fix request (11u) -- will label after testing completed. I would like to downport this for parity with 11.0.8-oracle. Applies clean.
09-04-2020

Fix Request (JDK 14.0.2) This patch is required for backporting JDK-8239931 and JDK-8240227 to JDK 14.0.2. The fix is low risk and applies cleanly to JDK 14.0.2. In addition to CI testing through all tiers in JDK 15 and 11u, additional testing will be executed in JDK 14.0.2 before pushing.
08-04-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/e04746cec89c User: stefank Date: 2020-03-02 11:31:25 +0000
02-03-2020