RFR: 8313672: C2: PhaseCCP does not correctly track analysis dependencies involving shift, convert, and mask [v14]
Daniel Lundén
duke at openjdk.org
Mon Nov 13 15:44:18 UTC 2023
> This changeset fixes an issue where the `PhaseCCP` analysis stopped before fixpoint due to `Value`-updates for `AndL` nodes involving shift, convert, and mask (`MulNode::AndIL_shift_and_mask_is_always_zero`). Such updates did not previously repopulate the `PhaseCCP` worklist correctly.
>
> Changes:
> - Fix the issue by adding the missing pattern to `PhaseCCP::push_and`.
> - Generalize `visit_uncasted_uses` to `visit_uses` to enable the functionality required in `PhaseCCP::push_and`.
> - Update the `assert` error message that reported the issue to better describe the problem. The `PhaseCCP` analysis is optimistic, and the previous error message seemed to indicate the opposite ("Missed optimization opportunity"). If the assert triggers, it could be that the analysis result leads to unsound transformations later on.
> - Add a regression test
>
> Result after `PhaseCCP` analysis (without fix, note `long:0` for node 116):
> 
>
> Result after `PhaseCCP` analysis (with fix, note `long` for node 116):
> 
>
> ### Testing
> `tier1`, `tier2`, `tier3`, `tier4`, `tier5` (windows-x64, linux-x64, linux-aarch64, macosx-x64, macosx-aarch64)
Daniel Lundén has updated the pull request incrementally with two additional commits since the last revision:
- Inline visit_uncasted_uses
- Replace Unique_Node_List
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16429/files
- new: https://git.openjdk.org/jdk/pull/16429/files/e9f8809d..9c97a12c
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16429&range=13
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16429&range=12-13
Stats: 64 lines in 2 files changed: 28 ins; 35 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/16429.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16429/head:pull/16429
PR: https://git.openjdk.org/jdk/pull/16429
More information about the hotspot-compiler-dev
mailing list