C2: extend the scope of StressGCM

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P4
    • tbd
    • Affects Version/s: 16
    • Component/s: hotspot

      Currently, in PhaseCFG::hoist_to_cheaper_block(), StressGCM follows the GCM heuristic when the candidate block has strictly better frequency and only only randomizes tie-breaking among equally frequent blocks:

      if (LCA_freq < least_freq || // Better Frequency
          (StressGCM && C->randomized_select(cand_cnt)) || // Should be randomly accepted in stress mode
          ...

      The randomization scope can be significantly extended by allowing GCM to move instructions to blocks with worse frequency at random:

      if ((StressGCM && C->randomized_select(cand_cnt)) || // Should be randomly accepted in stress mode
          (!StressGCM && LCA_freq < least_freq) || // Better Frequency
          ...

      This would improve StressGCM's ability to expose bugs where C2 relies on GCM heuristics for correctness.

            Assignee:
            Unassigned
            Reporter:
            Roberto Castaneda Lozano
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: