RFR: 8372845: Fold identity hash code if object is constant
Vladimir Ivanov
vlivanov at openjdk.org
Tue Dec 2 20:45:38 UTC 2025
On Tue, 2 Dec 2025 06:42:32 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
> Just an observation: This patch will only allow folding during parsing. I would expect that often, opportunities only arise after other optimizations already took place.
I deliberately omitted post-parse optimization opportunities for now. It would require a gradual lowering of the representation from a high-level macro node to low-level poking at object header. Moreover, final representation has complex control, so either the macro node should be a CFG node or a way to determine a location in CFG for a data-only macro node and expanding it there needs to be supported. (There are other use cases for such functionality, like lowering data nodes into pure calls, but no readily available implementation is there yet.)
IMO something to work on in a follow-up enhancement.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28589#issuecomment-3603886860
More information about the hotspot-compiler-dev
mailing list