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

Randomize order of macro node expansion in C2

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 23
    • 22
    • 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);
        }

            dlunden Daniel Lunden
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: