RFR: 8373495: C2: Aggressively fold loads from objects that have not escaped [v16]
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Tue Jan 13 12:57:35 UTC 2026
On Tue, 13 Jan 2026 12:24:06 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> Constructing local variables is cheap, but arena allocation is one of the main sources of overhead for C2. If we can avoid the allocations of `LocalEA::_aliases` and `LocalEA::_not_escaped_controls` in some cases by simply bailing out earlier, why not? Is there any drawback I am missing?
>
> Yes, that's why I'm suggesting improving `Unique_Node_List` default constructor not to allocate instead. The drawback I see here is that it is not trivial whether the current behaviour has any effect on non-oop memory accesses. And even if it is truly so, refactoring the function like that expands the scope of this PR a little bit.
Fair enough, I agree with not extending the scope of the PR if we are not sure about possible side-effects.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28812#discussion_r2686295679
More information about the hotspot-compiler-dev
mailing list