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

C2: pre-schedule initially-ready CreateEx nodes in LCM

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 19
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:

      Description

      CreateEx nodes that are initially ready in LCM (that is, do not have any input dependency in their basic block) must be scheduled at the beginning of their block, right after Phi and Parm nodes. This is currently enforced by placing them at the beginning of the initial ready list [1] so that they are selected before any other node [2]. Relying on the order of the ready list for correctness is fragile, and forces a tie between projections and other CreateEx nodes that are not initially ready in LCM node selection [2]. This tie can potentially lead to projections not being scheduled next to their parents, thus breaking an invariant of LCM [3].

      A more robust solution would be to pre-schedule CreateEx nodes that are initially ready in a similar manner to how Phi and Parm nodes are handled, and break the tie between projections and other CreateEx nodes in favor of projections.

      [1] https://github.com/openjdk/jdk/blob/89392fb15e9652b7b562b3511f79bda725c5499c/src/hotspot/share/opto/lcm.cpp#L1079-L1082
      [2] https://github.com/openjdk/jdk/blob/89392fb15e9652b7b562b3511f79bda725c5499c/src/hotspot/share/opto/lcm.cpp#L534-L542
      [3] https://github.com/openjdk/jdk/blob/89392fb15e9652b7b562b3511f79bda725c5499c/src/hotspot/share/opto/block.cpp#L1277-L1278

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated: