RFR: 8333258: C2: high memory usage in PhaseCFG::insert_anti_dependences()
Emanuel Peter
epeter at openjdk.org
Thu Jun 20 13:57:11 UTC 2024
On Thu, 20 Jun 2024 13:50:12 GMT, Roland Westrelin <roland at openjdk.org> wrote:
>> src/hotspot/share/opto/gcm.cpp line 689:
>>
>>> 687:
>>> 688: if (op == Op_MachProj || op == Op_Catch) continue;
>>> 689: if (store->needs_anti_dependence_check()) continue; // not really a store
>>
>> Why did you remove this?
>
> I didn't remove it, I moved it. It's what this:
>
>
> The fix I propose for this is to test before pushing on the work list
> whether a node is a store or not.
>
>
> refers to. What we do today is that we push all uses and then filter out those that are not of interest when they are popped. What I propose is to filter out what's not useful before it's pushed so the queue doesn't grow large with nodes that are going to be discarded anyway.
Ok, then I suggest that you at least replace this line with an `assert`. That could also help readability ;)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19791#discussion_r1647621134
More information about the hotspot-compiler-dev
mailing list