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

Jie Fu jiefu at openjdk.java.net
Fri Aug 20 12:47:29 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

This pull request has now been integrated.

Changeset: 1ea437a4
Author:    Jie Fu <jiefu at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/1ea437a4b87381b558cf8157ac52fc03e37ac507
Stats:     1 line in 1 file changed: 0 ins; 0 del; 1 mod

8272720: Fix the implementation of loop unrolling heuristic with LoopPercentProfileLimit

Reviewed-by: thartmann, rbackman

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

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


More information about the hotspot-compiler-dev mailing list