8 Commits

Author SHA1 Message Date
Roberto Castañeda Lozano
4e8338eb13 8255763: C2: OSR miscompilation caused by invalid memory instruction placement
Disable GCM hoisting of memory-writing nodes for irreducible CFGs. This prevents
GCM from wrongly "hoisting" stores into descendants of their original loop. Such
an "inverted hoisting" can happen due to CFGLoop::compute_freq()'s inaccurate
estimation of frequencies for irreducible CFGs.

Extend CFG verification code by checking that memory-writing nodes are placed in
either their original loop or an ancestor.

Add tests for the reducible and irreducible cases. The former was already
handled correctly before the change (the frequency estimation model prevents
"inverted hoisting" for reducible CFGs), and is just added for coverage.

This change addresses the specific miscompilation issue in a conservative way,
for simplicity and safety. Future work includes investigating if only the
illegal blocks can be discarded as candidates for GCM hoisting, and refining
frequency estimation for irreducible CFGs.

Reviewed-by: kvn, chagedorn
2020-12-21 13:04:24 +00:00
Christian Hagedorn
b369aefc79 8238765: PhaseCFG::schedule_pinned_nodes cannot handle precedence edges from unmatched CFG nodes correctly
Fix PhaseCFG::schedule_pinned_nodes to correctly handle precedence edges from unmatched CFG nodes.

Reviewed-by: roland, neliasso, kvn
2020-02-17 12:29:03 +01:00
Stefan Karlsson
e4b27a48a0 8183574: Unify the is_power_of_2 functions
Reviewed-by: kbarrett, redestad
2020-02-17 10:03:17 +01:00
Sergey Bylokhov
f8a875bfce 8231027: Correct typos
Reviewed-by: lancea, dholmes, erikj
2019-09-17 19:52:51 -07:00
Coleen Phillimore
154a1a02bf 8216167: Update include guards to reflect correct directories
Use script and some manual fixup to fix directores names in include guards.

Reviewed-by: lfoltan, eosterlund, kbarrett
2019-01-10 15:13:51 -05:00
Thomas Schatzl
e98c176026 8208670: Compiler changes to allow enabling -Wreorder
Reviewed-by: kvn
2018-08-08 15:31:06 +02:00
Coleen Phillimore
ee9d695757 8199283: Remove ValueObj class for allocation subclassing for compiler code
Reviewed-by: stefank, tschatzl
2018-03-09 20:01:38 -05:00
Erik Joelsson
3789983e89 8187443: Forest Consolidation: Move files to unified layout
Reviewed-by: darcy, ihse
2017-09-12 19:03:39 +02:00