RFR(S): 8199784: PhaseIdealLoop::place_near_use() might return wrong control with loop strip mining

Roland Westrelin rwestrel at redhat.com
Wed Mar 21 09:18:57 UTC 2018

> I agree with changes. But can you explain why you need additional check useblock == u_loop->_head? 
> Since x (clone) comes from outside loop it should be safe place it outside OuterStripMinedLoop.

The outer strip mined loop is only a skeleton. It has no Phi. They are
added to match those of the counted loop only after loop opts. If the
use of the load is a counted loop Phi, once the outer loop phis are
added, we want the load to be an input of one of those Phis. So the load
must not be sunk between the counted loop and the outer strip mined

if (useblock == u_loop->_head && u_loop->_head->is_OuterStripMinedLoop()) {

tests for that case.


More information about the hotspot-compiler-dev mailing list