mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +02:00
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
This commit is contained in:
parent
ac276bb394
commit
f353fcf256
7 changed files with 233 additions and 46 deletions
|
@ -2748,7 +2748,7 @@ void Compile::Code_Gen() {
|
|||
|
||||
print_method(PHASE_GLOBAL_CODE_MOTION, 2);
|
||||
NOT_PRODUCT( verify_graph_edges(); )
|
||||
debug_only( cfg.verify(); )
|
||||
cfg.verify();
|
||||
}
|
||||
|
||||
PhaseChaitin regalloc(unique(), cfg, matcher, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue