[code-reflection] RFR: Aggregated work on Verifier and BytecodeLift deconstruction [v2]

Adam Sotona asotona at openjdk.org
Wed Nov 6 17:26:43 UTC 2024


On Wed, 6 Nov 2024 17:17:30 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> This method tests if the given set of values represent a dominating set for the actual value. I hope the implementation matches the "Dominating sets in directed graphs" definition.
>> 
>> I've moved it here because there are already two uses of the method:
>> - BytecodeGenerator::isDefinitelyAssigned needs to test for the dominance of VarStoreOps set to decide if the VarOp can be deferred 
>> - SlotToVarTransformer::isDominatedByTheSameVar needs to test dominance of set of SlotOp predecessors to identify initial SlotStoreOps.
>
> I understand the motivation, and the documentation is appreciated, but for i now i still think it better to let it soak within the bytecode package. I don't think it is ready to have such prominence in the core API, maybe it never will. That's not imply it is not useful for your purposes, but i am skeptical at the moment of its broad use.
> 
> The existing `isDominatedBy` methods on code items have quite a precise meaning with regards to nested hierarchy and block dominance. This method is very different and merges the concept of is-dominated-by-any-value with a dominance-like frontier approach, where values are substituted for their blocks (presumably within the same body, otherwise it does not make much sense) and there is some implicit relation between the values in those blocks. Splitting it in two concepts may make more sense.

It has exactly same meaning as `isDominatedBy`. Second part is focused on blocks only because individual dominance test in the first part covers the situations where any member of the tested set precedes the value in the same block (or in the entry block) - so it is individually dominant and the method returns true. If any member of the set is individually dominant, the whole set is dominant.

-------------

PR Review Comment: https://git.openjdk.org/babylon/pull/258#discussion_r1831443092


More information about the babylon-dev mailing list