Currently, in PhaseCFG::hoist_to_cheaper_block(), StressGCM follows the GCM heuristic when the candidate block has strictly better frequency and only only randomizes tie-breaking among equally frequent blocks:
if (LCA_freq < least_freq || // Better Frequency
(StressGCM && C->randomized_select(cand_cnt)) || // Should be randomly accepted in stress mode
...
The randomization scope can be significantly extended by allowing GCM to move instructions to blocks with worse frequency at random:
if ((StressGCM && C->randomized_select(cand_cnt)) || // Should be randomly accepted in stress mode
(!StressGCM && LCA_freq < least_freq) || // Better Frequency
...
This would improve StressGCM's ability to expose bugs where C2 relies on GCM heuristics for correctness.
if (LCA_freq < least_freq || // Better Frequency
(StressGCM && C->randomized_select(cand_cnt)) || // Should be randomly accepted in stress mode
...
The randomization scope can be significantly extended by allowing GCM to move instructions to blocks with worse frequency at random:
if ((StressGCM && C->randomized_select(cand_cnt)) || // Should be randomly accepted in stress mode
(!StressGCM && LCA_freq < least_freq) || // Better Frequency
...
This would improve StressGCM's ability to expose bugs where C2 relies on GCM heuristics for correctness.
- duplicates
-
JDK-8271118 C2: StressGCM should have higher priority than frequency-based policy
- Resolved
- is blocked by
-
JDK-8258894 C2: Forbid GCM to move stores into loops
- Resolved
-
JDK-8263227 C2: inconsistent spilling due to dead nodes in exception block
- Resolved
-
JDK-8261236 C2: ClhsdbJstackXcompStress test fails when StressGCM is enabled
- Resolved
- relates to
-
JDK-8258895 C2: Refine execution frequency estimation for irreducible CFGs
- Open
- links to
-
Review openjdk/jdk/1469
(1 links to)