[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-compiler-dev
Subject:    Re: RFR: 8320649: C2: Optimize scoped values [v4]
From:       Roland Westrelin <roland () openjdk ! org>
Date:       2024-01-30 16:17:00
Message-ID: zKg8gmzbphylRA-bjOYjujudbpgeKWeLHodgfmhvgno=.082ee957-2ace-4d0c-8db6-822123096415 () github ! com
[Download RAW message or body]

On Thu, 18 Jan 2024 10:40:46 GMT, Emanuel Peter <epeter@openjdk.org> wrote:

> > Roland Westrelin has updated the pull request incrementally with one additional \
> > commit since the last revision: 
> > merge fix
> 
> src/hotspot/share/opto/loopnode.cpp line 4767:
> 
> > 4765:   Node* second_index = get_from_cache->index2();
> > 4766: 
> > 4767:   if (first_index == C->top() && second_index == C->top()) {
> 
> could this not be done during igvn?

What happens here is that the cache was always seen to be null so no code to to probe \
the cache was added to the IR. When that happens, the optimizations still apply (i.e. \
there could be dominated `ScopedValue.get()` that can be replaced by this one or a \
dominating one that can replace this one). This should also be very uncommon. So the \
nodes that are put in place to enable optimizations should be left in until expansion \
to not miss optimization opportunities.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16966#discussion_r1471360274


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic