Elide more final field's write memory barrier with escape analysis result

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: None
    • Component/s: hotspot
    • Environment:

      aarch64 development board

    • b89
    • aarch64
    • generic
    • Fix failed

        MemBarRelease for final field write can be removed when its allocation doesn't escape thread, allocation node can be acquired from its MemBarNode::Precedent input.
        Currently, MemBarRelase's Precedent input is only added when eliminate_boxing is true and its owning object is primitive Box (see Parse::do_put_xxx and Parse::do_exits). Checking OpenJDK log, this is added for autoboxing elimination early. Now I suggest turn on this optimization for general object type, this can benefit RMO platform (like aarch64) performance.

        Enhancement try removing constraints for set_alloc_with_final(obj) in do_put_xxx (parse3.cpp). This leads to adding Precedent input for all kind object's final field writes' MemBarRelase node. Then they have opportunities to get optimized.

              Assignee:
              Hui Shi
              Reporter:
              Hui Shi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: