RFR: 8320649: C2: Optimize scoped values [v4]

Emanuel Peter epeter at openjdk.org
Thu Jan 18 10:45:34 UTC 2024


On Thu, 18 Jan 2024 08:48:37 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> src/hotspot/share/opto/loopPredicate.cpp line 1572:
>> 
>>> 1570: 
>>> 1571: 
>>> 1572: bool PhaseIdealLoop::loop_predication_for_scoped_value_get(IdealLoopTree* loop, IfProjNode* if_success_proj,
>> 
>> Add a short comment above, that we are trying to hoist the `If` for a `ScopedValueGetHitsInCache` out of the loop, if possible.
>> You have one on the first line, but I think generally we place them at the top, right?
>
> Well, now looking at the method... maybe a longer comment with a picture or pseudocode would be helpful.
> It would greatly help me in reviewing the code - otherwise I basically have to draw the picture on a piece of paper myself before understanding it ;)

I like it the most when there is ascii art that uses the variable names in the code below.

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

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


More information about the hotspot-compiler-dev mailing list