RFR(S): 8214172: GC interface entry points for loop opts
rwestrel at redhat.com
Wed Nov 21 09:07:40 UTC 2018
For Shenandoah, we apply our own set of optimizations as part of loop
optimizations. This patch adds some hooks for this.
1- optimizes its write barriers during loop optimizations
2- expands write barriers as a special pass of loop optimizations (write
barriers are kept floating for most of optimizations and then need to be
pinned which requires control and dominator information)
3- has a few optimizations that are applied to expanded write barriers
as further passes of optimizations after expansion
Because of 2-, this patch changes the gc interface for barrier expansion
so it doesn't have to happen as part of macro expansion.
Because of 3-, we call back Compile::optimize_loops() from shenandoah
code, I made _loop_opts_cnt an instance variable so a global count can
be kept and there's no need to pass it around across multiple gc
Because of 3-, we optimize loops after loop strip mined loops are fully
expanded. So we must not create new loop strip mined loops in those
passes. The logic in PhaseIdealLoop::verify_strip_mined_scheduling()
breaks in that case too so it is skipped for those passes.
More information about the hotspot-compiler-dev