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

Vladimir Kozlov vladimir.kozlov at oracle.com
Wed Mar 21 16:52:28 UTC 2018


I am asking why not just do next?:
+  if (u_loop->_child) {
+    if (u_loop->_head->is_OuterStripMinedLoop()) {
+      return u_loop->_head->in(LoopNode::EntryControl);

Vladimir

> On Mar 21, 2018, at 2:18 AM, Roland Westrelin <rwestrel at redhat.com> wrote:
> 
> 
>> 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
> loop.
> 
> if (useblock == u_loop->_head && u_loop->_head->is_OuterStripMinedLoop()) {
> 
> tests for that case.
> 
> Roland.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20180321/b309a342/attachment.html>


More information about the hotspot-compiler-dev mailing list