RFR: 8333334: C2: Make result of `Node::dominates` more precise to enhance scalar replacement [v6]
Tobias Hartmann
thartmann at openjdk.org
Mon Aug 19 06:12:54 UTC 2024
On Tue, 9 Jul 2024 02:46:13 GMT, Qizheng Xing <qxing at openjdk.org> wrote:
>> test/hotspot/jtreg/compiler/c2/irTests/scalarReplacement/ScalarReplacementWithGCBarrierTests.java line 107:
>>
>>> 105: @IR(phase = { CompilePhase.AFTER_PARSING }, counts = { IRNode.ALLOC, "1" })
>>> 106: @IR(phase = { CompilePhase.INCREMENTAL_BOXING_INLINE }, counts = { IRNode.ALLOC, "2" })
>>> 107: @IR(applyIf = { "UseG1GC", "true" }, phase = { CompilePhase.ITER_GVN_AFTER_ELIMINATION }, counts = { IRNode.ALLOC, "1" })
>>
>> Your test checks for the number of allocations to return to one. However in your description and comments you talk about load nodes that aren't folded. What about adding another IR test to check the number of loads for completeness?
>
> I think it's hard to add an intuitive and meaningful IR test for load nodes in this test case.
>
> To construct a case that containing both eliminable GC pre-barriers and allocations, and have them interfere with each other, I had to put several object field reads/writes into nested loops. This makes a large number of load nodes appearing in this test case after some optimization phases. Perhaps after several more optimizations, most of them will disappear and new loads will appear again. So it's difficult to tell which load we really care about without looking at the Ideal graph dump via IGV.
Right, I think the test is fine as is.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19496#discussion_r1721256045
More information about the hotspot-compiler-dev
mailing list