RFR: 8272720: Fix the implementation of loop unrolling heuristic with LoopPercentProfileLimit

Rickard Bäckman rbackman at openjdk.java.net
Fri Aug 20 08:40:23 UTC 2021


On Thu, 19 Aug 2021 13:12:22 GMT, Jie Fu <jiefu at openjdk.org> wrote:

> Hi all,
> 
> I'd like to fix the implementation of loop unrolling heuristic with `LoopPercentProfileLimit`.
> 
> The range of `LoopPercentProfileLimit` was designed as [10, 100] [1].
> But in fact there is no difference when `LoopPercentProfileLimit > 50` for the current implementation.
> 
> This is because integer div `100 / LoopPercentProfileLimit` [2] will always return 1 when `LoopPercentProfileLimit > 50`.
> It would be better to fix it.
> 
> Thanks.
> Best regards,
> Jie
> 
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/c2_globals.hpp#L179
> [2] https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/loopTransform.cpp#L908

Marked as reviewed by rbackman (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/5183


More information about the hotspot-compiler-dev mailing list