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

C2: Extend Trace in one iteration when block ordering

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 17, 18
    • Fix Version/s: tbd
    • Component/s: hotspot

      Description

      I think grow_traces and merge_traces actually do the same thing, their purpose is to extend the trace as long as possible, only the strategy of selecting those traces to be extended is different. The current implementation traverses all CFG edges three times, I think we can achieve it in two (or even one) times.

      ```
        // Grow traces at their ends via most frequent edges.
        grow_traces();

        // Merge one trace into another, but only at fall-through points.
        // This may make diamonds and other related shapes in a trace.
        merge_traces(true);

        // Run merge again, allowing two traces to be catenated, even if
        // one does not fall through into the other. This appends loosely
        // related traces to be near each other.
        merge_traces(false);
      ```

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            yyang Yi Yang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: