RFR: 8255000: C2: Unify IGVN processing when loop opts are over
Vladimir Ivanov
vlivanov at openjdk.java.net
Wed Oct 21 07:43:10 UTC 2020
On Wed, 21 Oct 2020 00:53:01 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> There is a number of use cases when ideal nodes (either individual or even the whole classes) delay some
>> transformations until loop optimizations are over.
>> Unfortunately, there are multiple solutions in the code base with their pros and cons: either a custom per-node class
>> logic (e.g., for range check dependent `CastII` or `Opaque4` nodes) or `Compile::major_progress() == 0` as a signal
>> that loop opts are over. I propose to introduce a unified approach to reliably process nodes that require (or may
>> benefit from) IGVN pass once loop opts are finally over and migrate existing use cases to it.
>> After some experimentation, I decided not to rely on `Compile::major_progress()` because:
>> * it's hard to reason about its properties (there are many places where it is adjusted);
>> * attempts to verify its monotonicity using asserts triggered too many sporadic failures.
>>
>> So, I wasn't persuaded that `Compile::major_progress() == 0` is reliable enough and introduced a dedicated flag
>> (`Compile::post_loop_opts_phase()`) which signals that loop opts are over.
>> (The patch - 69a93d4 commit - is on top of 8255026 cleanup which is reviewed separately.)
>>
>> Testing: tier1-tier5
>
> Nice clean up.
Thanks for the reviews, Nils, Igor, and Vladimir.
-------------
PR: https://git.openjdk.java.net/jdk/pull/751
More information about the shenandoah-dev
mailing list