c2: loop optimizations for read barriers
Roland Westrelin
rwestrel at redhat.com
Fri Sep 16 07:22:06 UTC 2016
http://cr.openjdk.java.net/~roland/shenandoah/rb-loop-opts/webrev.00/
The change to PhaseIdealLoop::split_if_with_blocks_post() in
loopopts.cpp enables sinking of read barriers out of loops: if a read
barrier is in a loop but all of its uses are out of loop, the read
barrier is cloned and pinned out of loop for each use.
try_move_shenandoah_read_barrier() tries to move the memory edge of a
read barrier as high in the graph as legal. Read barriers are sometimes
stuck in a loop because of their memory edge. That change would fix
that. It should also help in removing redundant read barriers (they
should all end up with the same memory input). Because we now have a
global pass on read barriers, restricting
ShenandoahReadBarrierNode::dominates_memory_rb_impl() to be local to the
node being optimized shouldn't cause a performance regression.
Roland.
More information about the shenandoah-dev
mailing list