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

Expand functionality of PredictedIntrinsicGenerator

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b20
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Some intrinsic may need to check several classes in predicate for which intrinsic should be generated.
        The mechanism of intrinsic_foo_predicate() and intrinsic_foo() was designed only to check one class so that you don't need class check in intrinsic_foo().
        But for several classes you have to check instanceOf for all of them in both intrinsic_foo_predicate() and intrinsic_foo().
        We need to expand this functionality to do something like next in PredictedIntrinsicGenerator::generate():

          int klass_cnt = intrinsic_foo_klass_count();
          Node* result_region = new Region(klass_cnt+1);
          for (int i = 0; i < klass_cnt; i++) {
            false_control = intrinsic_foo_predicate(i);
            intrinsic_foo(i);
            result_region->set_req(i, control());
            set_control(false_control);
          }
          generate_normal_compile()
          result_region->set_req(klass_cnt, control());
          set_control(result_region);

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                Unassigned Unassigned
                Reporter:
                kvn Vladimir Kozlov
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: