git: openjdk/jdk: 8258894: C2: Forbid GCM to move stores into loops
Tobias Hartmann
thartmann at openjdk.java.net
Wed Jan 27 15:09:54 UTC 2021
Changeset: f353fcf2
Author: Roberto Castañeda Lozano <rcastanedalo at openjdk.org>
Committer: Tobias Hartmann <thartmann at openjdk.org>
Date: 2021-01-27 15:08:39 +0000
URL: https://git.openjdk.java.net/jdk/commit/f353fcf2
8258894: C2: Forbid GCM to move stores into loops
Prevent GCM from placing memory-writing nodes (such as stores) into loops deeper
than their home loop (determined by their control input). Such placements are
invalid, as they cause memory definitions to interfere, and risk causing
miscompilations. This change complements JDK-8255763, which only addresses
invalid placements in irreducible CFGs.
Add control input to stores in generated stubs to ensure that all memory-writing
nodes have control inputs from which their home block can be derived.
Add a battery of simplified fuzzer test cases where, before this change, GCM
moves stores into deeper loops.
Reviewed-by: thartmann, kvn
! src/hotspot/share/opto/block.cpp
! src/hotspot/share/opto/block.hpp
! src/hotspot/share/opto/compile.cpp
! src/hotspot/share/opto/gcm.cpp
! src/hotspot/share/opto/generateOptoStub.cpp
! src/hotspot/share/opto/node.hpp
! test/hotspot/jtreg/compiler/codegen/TestGCMStorePlacement.java
More information about the jdk-changes
mailing list