[lworld] Atomic accesses might block other optimizations

XMLWordPrintable

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

      JDK-8354981 added MemBarCPUOrders around flat, atomic stores because they are mismatched and then JDK-8357474 also added them around loads. This is needed to protect loads from incorrectly floating above and in-line with what we do for mismatched Unsafe accesses in mainline (see JDK-8223923 / https://github.com/openjdk/jdk/pull/5146 for context).

      JDK-8354068 added code to fold strict field loads more aggressively but skipping above mentioned MemBarCPUOrders is incorrect. I disabled it with JDK-8359345.

      We should investigate if we can do better here and write corresponding IR framework tests. Also, I wonder if skipping these MemBarCPUOrder is even correct in mainline. Some quick logging that I added showed that we skip them in mainline as well.

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

              Created:
              Updated:
              Resolved: