Integrated: JDK-8277496 Remove duplication in c1 Block successor lists
Ludvig Janiuk
duke at openjdk.java.net
Mon Dec 6 09:02:18 UTC 2021
On Tue, 30 Nov 2021 14:14:36 GMT, Ludvig Janiuk <duke at openjdk.java.net> wrote:
> Remove `BlockBegin::_successors`, leaving `BlockEnd::_sux` as the SSOT for the successors of a block. Prior to this PR, these two lists were both tracking the same list of successors of the same block. This necessitated a lot of syncing and verification code.
>
> With this PR, as long as a block has its end pointer assigned, its successors can always be reached by querying the `BlockEnd`. `BlockEnd::_sux` becomes the single place where the list of successors is maintained. When modified, the successor list no longer needs to be synchronized in two places, reducing complexity and confusion. Asserts on the two lists corresponding no longer need to be made.
>
> While being created in `GraphBuilder`, `BlockBegin`s don't have a `BlockEnd` assigned yet. To temporarily track block successors in this small interval, add a lookup structure `BlockListBuilder::_bci2block_successors`.
>
> This PR affects debug printing code. If the end pointer of a `BlockBegin `is NULL for some reason, then the successor list can no longer be printed (for obious reasons).
>
> This PR introduces an additional check to IR::verify to check that `BlockBegin::_end` is not set to null.
>
> This PR also performs some minor refactoring, polishing, inlining, and removing of dead code around the affected areas.
>
> The commit history has been polished to attempt to guide the reader through the changes.
>
> hs-tier1 and hs-tier2 tests pass.
This pull request has now been integrated.
Changeset: 8d190dd0
Author: Ludvig Janiuk <ludvig.j.janiuk at oracle.com>
Committer: Nils Eliasson <neliasso at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/8d190dd003c58aa9ebb403e95a73a128af7e8941
Stats: 194 lines in 8 files changed: 89 ins; 73 del; 32 mod
8277496: Remove duplication in c1 Block successor lists
Reviewed-by: neliasso, kvn
-------------
PR: https://git.openjdk.java.net/jdk/pull/6614
More information about the hotspot-compiler-dev
mailing list