RFR: 8342975: C2: Micro-optimize PhaseIdealLoop::Dominators() [v2]
Dean Long
dlong at openjdk.org
Fri Oct 25 21:07:11 UTC 2024
On Fri, 25 Oct 2024 05:52:39 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Noticed this while looking at Leyden profiles. C2 seems to spend considerable time doing in this loop. The disassembly shows this loop is fairly hot. Replacing the initialization with memset, while touching more memory, is apparently faster. memset is also what we normally do around C2 for arena-allocated data. We seem to touch a lot of these structs later on, so pulling them to cache with memset is likely "free".
>>
>> It also looks like current initialization misses initializing the last element (at `C->unique()`).
>>
>> I'll put performance data in separate comment.
>
> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>
> Better comment
Looks good.
-------------
Marked as reviewed by dlong (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/21690#pullrequestreview-2396486266
More information about the hotspot-compiler-dev
mailing list