--- old/src/hotspot/share/opto/compile.cpp 2018-06-08 19:45:28.740488178 +0200 +++ new/src/hotspot/share/opto/compile.cpp 2018-06-08 19:45:28.470476464 +0200 @@ -75,9 +75,13 @@ #include "runtime/timer.hpp" #include "utilities/align.hpp" #include "utilities/copy.hpp" +#include "utilities/macros.hpp" #if INCLUDE_G1GC #include "gc/g1/g1ThreadLocalData.hpp" #endif // INCLUDE_G1GC +#if INCLUDE_ZGC +#include "gc/z/c2/zBarrierSetC2.hpp" +#endif // -------------------- Compile::mach_constant_base_node ----------------------- @@ -2163,6 +2167,11 @@ #endif +#ifdef ASSERT + BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2(); + bs->verify_gc_barriers(true); +#endif + ResourceMark rm; int loop_opts_cnt; @@ -2335,6 +2344,12 @@ } } +#if INCLUDE_ZGC + if (UseZGC) { + ZBarrierSetC2::find_dominating_barriers(igvn); + } +#endif + if (failing()) return; // Ensure that major progress is now clear @@ -2361,6 +2376,7 @@ { TracePhase tp("macroExpand", &timers[_t_macroExpand]); PhaseMacroExpand mex(igvn); + print_method(PHASE_BEFORE_MACRO_EXPANSION, 2); if (mex.expand_macro_nodes()) { assert(failing(), "must bail out w/ explicit message"); return; @@ -2890,6 +2906,10 @@ case Op_LoadL_unaligned: case Op_LoadPLocked: case Op_LoadP: +#if INCLUDE_ZGC + case Op_LoadBarrierSlowReg: + case Op_LoadBarrierWeakSlowReg: +#endif case Op_LoadN: case Op_LoadRange: case Op_LoadS: {