RFR(S): 8201532: Update idom to get correct dom depth calculation

Nils Eliasson nils.eliasson at oracle.com
Fri Apr 13 12:42:59 UTC 2018



On 2018-04-13 14:19, Roland Westrelin wrote:
> Hi Nils,
>
>> This problem started show up due to loop strip mining and ZGC barriers.
>> ZGC loadbarriers can be moved out of loops, that increases the loop
>> depth of the loop node.
> When moving the loadbarrier out of loop, it shouldn't be needed to
> increase the loop depth. If it is moved between the outer strip mined
> loop and the counted loop, the dom depth of the barrier and its control
> projection should be set to the dom depth of the outer strip mined
> loop. The code that deals with domination (is_dominator() etc.) can handle
> several control nodes with the same dom depth.
>
> Roland.

What happens is that when the counted loop transformation replaces the 
loop exit projections here 
(http://hg.openjdk.java.net/jdk/hs/file/69bae761600b/src/hotspot/share/opto/loopnode.cpp#l728), 
any recalculation of dom depth will continue to be wrong on the 
successors. (Until the lazy mappings have propageted to the _idom.) If a 
loadbarrier is moved out of the loop, or any other transformation is 
performed that increases the loop depth, we may later fail in clone_loop 
here 
(http://hg.openjdk.java.net/jdk/hs/file/69bae761600b/src/hotspot/share/opto/loopopts.cpp#l2010) 
when the new deeper dom depth of the loop is compared with the old doom 
depth of the successor node.

/ Nils









More information about the hotspot-compiler-dev mailing list