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

[MVT] Eliminate redundant value type allocations

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: hotspot
    • Labels:

      Description

      C2 currently creates two allocations in the following case:

              // Create value type and force allocation
              MyValue3 vt = MyValue3.create();
              va[0] = vt;
              val77 = vt;
              vt.verify(val77);

              // Value type is now allocated, make a copy and force allocation.
              MyValue3 copy = MyValue3.setC(vt, vt.c);
              va[0] = copy;

      But because copy is equal to vt, C2 should eliminate this redundant allocation.

        Attachments

          Activity

            People

            Assignee:
            thartmann Tobias Hartmann
            Reporter:
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: