Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8240223

Use consistent predicate order in and with PhaseIdealLoop::find_predicate

    Details

    • Subcomponent:
    • Resolved In Build:
      b13

      Backports

        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;
        }

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  stefank Stefan Karlsson
                  Reporter:
                  stefank Stefan Karlsson
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: