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

[lworld] Atomic accesses might block other optimizations

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Not an Issue
    • Icon: P4 P4
    • repo-valhalla
    • repo-valhalla
    • 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.

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

              Created:
              Updated:
              Resolved: