Expand functionality of PredictedIntrinsicGenerator

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 9
    • Component/s: hotspot
    • b20
    • generic
    • generic

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

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

                Created:
                Updated:
                Resolved: