Attempt some loop opts after write barrier expansion

Roman Kennke rkennke at redhat.com
Tue Jan 3 18:00:29 UTC 2017


Looks good and sounds very useful.

Not your fault, but somebody should change those flags to 1<<$shift :-S

RomanAm 03.01.2017 1:59 nachm. schrieb Roland Westrelin <rwestrel at redhat.com>:
>
>
> http://cr.openjdk.java.net/~roland/shenandoah/wbloopopts/webrev.00/ 
>
> This attempts a few more rounds of loop opts after write barrier 
> expansion. 
>
> When there are 2 write barriers in a row, the evacuation in progress 
> tests are merged: 
>
> if (evac_in_progress) { 
>   slow_path_1 
> } else { 
>   fast_path_1 
> } 
> if (evac_in_progress) { 
>   slow_path_2 
> } else { 
>   fast_path_2 
> } 
>
> becomes: 
>
> if (evac_in_progress) { 
>   slow_path_1 
>   slow_path_2 
> } else { 
>   fast_path_1 
>   fast_path_2 
> } 
>
> Loops are unswitched when they contain an evacuation in progress test 
> that can be moved out of the loop (i.e. no safepoint = 
> -UseCountedLoopSafepoints). 
>
> for (;;) { 
>   some_stuff 
>   if (evac_in_progress) { 
>     slow_path 
>   } else { 
>     fast_path 
>   } 
>   more_stuff 
> } 
>
> becomes 
>
> if (evac_in_progress) { 
>   for (;;) { 
>     some_stuff 
>     slow_path 
>     more_stuff 
>   } 
> } else { 
>   for (;;) { 
>     some_stuff 
>     fast_path 
>     more_stuff 
>   } 
> } 
>
> Roland. 


More information about the shenandoah-dev mailing list