RFR: JDK-8277496 Remove duplication in c1 Block successor lists [v3]
Nils Eliasson
neliasso at openjdk.java.net
Wed Dec 1 13:46:22 UTC 2021
On Wed, 1 Dec 2021 13:20:49 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.
>
> Ludvig Janiuk has updated the pull request incrementally with one additional commit since the last revision:
>
> changed if statement style
Looks good! Thanks for fixing!
-------------
Marked as reviewed by neliasso (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/6614
More information about the hotspot-compiler-dev
mailing list