Hello Suchismith,
The question doesn't look related to building the JDK. I think
hotspot-dev mailing list might be a better place to ask this question
https://mail.openjdk.org/mailman/listinfo/hotspot-dev
-Jaikiran
On 13/02/26 6:22 pm, Suchismith Roy wrote:
Hi All
I am currently working on JDK-8216554 , which is related to optimise
loading of constants in c2 compilation by determining the size of TOC
in post_alloc stage.
This is for PowerPC
Currently there is a default code that emits combination of addis+ld
instruction even in possible cases where only ld instruction can be
emitted. There is an alternate code based on small size of TOC that
emits only ld, but we are not taking it.
I tried to do a gdb debug, i am unable to get the constant table size
at post_alloc stage.
It is only after the emit stage we get the size of TOC.
Does that mean we cannot ever get accurate size in post_alloc stage ?
I also tried a test case and forced the c2 compiler emit ld only.
Interestingly, the global size of TOC was large and calculated much
later, and macroassembler puts in addis+addi .
So the case of large offset, even if miscalculated in post_alloc stage
, is handled in some way.
Does that mean we can just keep the conservative path of emitting
Addis+addi ? Or maybe we can even remove the helper function in
post_alloc stage.
Open to your suggestions. Will provide a few debug logs too as per
your request.
Thanks
Suchismith Roy