RFR: 8259609: C2: optimize long range checks in long counted loops [v6]
Radoslaw Smogura
github.com+7535718+rsmogura at openjdk.java.net
Mon Sep 20 21:23:45 UTC 2021
On Mon, 20 Sep 2021 15:36:47 GMT, Roland Westrelin <roland at openjdk.org> wrote:
>> Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:
>>
>> whitespace
>
> Another comment to keep this alive
Hi @rwestrel
I've been pointed here from other PR.
I wonder if I can help a little bit. I tried to do something similar and I think that this could be interesting.
Firstly I started with using Overflow nodes to check if long values can overflow, I link some experimental work here [1] (minus few commits)
However I realized that if we will focus only on int loops, with long range checks, and we put some constraints:
* on scale (i.e. `-(1 << 24) < scale < (1<<24)`), and
* `0 <= range < max_jlong`
* both lower and upper bound is inserted
than _probably_ we don't even have to try to catch long overflow.
All what we would here is just to tune a little bit `rc_predicate`, to better handle long typed nodes, and make some adjustments in other places.
This could be helpful for Panama project, as memory segments and vectors could use following approach
I wonder if this would be a good direction, and if I can help somehow?
[1] https://github.com/openjdk/panama-vector/pull/128/files
-------------
PR: https://git.openjdk.java.net/jdk/pull/2045
More information about the hotspot-compiler-dev
mailing list