[code-reflection] RFR: Aggregated work on Verifier and BytecodeLift deconstruction [v5]
Adam Sotona
asotona at openjdk.org
Wed Nov 6 11:44:42 UTC 2024
On Tue, 5 Nov 2024 18:04:33 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
>> Adam Sotona has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - TestSmallCorpus reached 3rd round 100% stability, no exceptions, no verification errors
>> - BytecodeLift fix of followup with unresolved array component types of unknown TypeKind
>
> src/java.base/share/classes/java/lang/reflect/code/Value.java line 152:
>
>> 150: * @throws IllegalStateException if the declaring block is partially built
>> 151: */
>> 152: public boolean isDominatedBy(Set<? extends Value> doms) {
>
> It would be better for now to move this method back into the bytecode area as non-public. Currently it's too specialized and not-well defined.
>
> From reading the specification one might expect it to return true if this value is dominated be all given values. But, it returns true if any given value does. If none dominate then it checks if there is path back from this value's block to the entry block of the same parent body. That is not directly related to dominance, but related dominance frontiers which is a different concept. Returning true in the second cases doe not mean dominance.
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.
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/258#discussion_r1830876466
More information about the babylon-dev
mailing list