Integrated: 8342975: C2: Micro-optimize PhaseIdealLoop::Dominators()

Aleksey Shipilev shade at openjdk.org
Mon Oct 28 15:40:34 UTC 2024


On Thu, 24 Oct 2024 17:10:42 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.

This pull request has now been integrated.

Changeset: e659d9da
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/e659d9da5d6198ad9c85efd6472e138a6a3961c2
Stats:     5 lines in 1 file changed: 1 ins; 1 del; 3 mod

8342975: C2: Micro-optimize PhaseIdealLoop::Dominators()

Reviewed-by: dlong, kvn

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

PR: https://git.openjdk.org/jdk/pull/21690


More information about the hotspot-compiler-dev mailing list