RFR: 8272720: Fix the implementation of loop unrolling heuristic with LoopPercentProfileLimit
Jie Fu
jiefu at openjdk.java.net
Thu Aug 19 13:19:37 UTC 2021
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
-------------
Commit messages:
- 8272720: Fix the implementation of loop unrolling heuristic with LoopPercentProfileLimit
Changes: https://git.openjdk.java.net/jdk/pull/5183/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5183&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8272720
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jdk/pull/5183.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/5183/head:pull/5183
PR: https://git.openjdk.java.net/jdk/pull/5183
More information about the hotspot-compiler-dev
mailing list