[MVT] Eliminate redundant value type allocations

XMLWordPrintable

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

      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.

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

              Created:
              Updated:
              Resolved: