RFR: 8227505: SuperWordLoopUnrollAnalysis may lead to over loop unrolling
vladimir.kozlov at oracle.com
Tue Aug 6 21:58:39 UTC 2019
Very interesting observation. I am concern that webrev.01 does check for general loop which may not
be vectorized. Even if your optimization helps in particular case it may make some loop regress due
to executing more branches.
On 7/11/19 1:20 AM, Jie Fu wrote:
> Hi all,
> With more experiments, the loop's trip_count seems a good feature to detect over loop unrolling.
> And on some platforms, the branch-miss rate had been observed increasing dramatically with small
> loop trip count.
Why? With more unrolling you should have less number of branches.
> It seems that we shouldn't unroll if the trip count becomes too small.
May be there is different explanation for this. May be big loop body does not fit into code buffer
in X86 cpu - or something like that. End we should watch for body size instead.
> I've updated the webrev here: http://cr.openjdk.java.net/~jiefu/8227505/webrev.01/
> Please review it and give me some advice.
> Thanks a lot.
> Best regards,
> On 2019/7/10 下午4:38, Jie Fu wrote:
>> Hi all,
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8227505
>> Webrev: http://cr.openjdk.java.net/~jiefu/8227505/webrev.00/
>> The patch fix the over loop unrolling problem caused by SuperWordLoopUnrollAnalysis.
>> For more info., please refer to the JBS.
>> Could you please review it and give me some advice?
>> Thanks a lot.
>> Best regards,
More information about the hotspot-compiler-dev