Randomize order of macro node expansion in C2

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 23
    • Affects Version/s: 22
    • Component/s: hotspot
    • b09

      Similar to JDK-8252219, we should also randomize the order in which nodes are expanded during macro expansion.

      As a quick hack, I added the following code to the beginning of Compile::sort_macro_nodes() which worked just fine:

        for (int i = 0; i < count; i++) {
          uint j = C->random() % count;
          Node* a = macro_node(i);
          Node* b = macro_node(j);
          _macro_nodes.at_put(i, b);
          _macro_nodes.at_put(j, a);
        }

            Assignee:
            Daniel Lunden
            Reporter:
            Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: