RFR: 8269122: The use of "extern const" for Register definitions generates poor code [v3]
Kim Barrett
kbarrett at openjdk.java.net
Tue Jun 22 17:32:31 UTC 2021
On Tue, 22 Jun 2021 12:08:51 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> Register definitions in HotSpot are declared as "extern const"
>> for ancient-historical reasons. We should stop doing that: it would
>> make the assembler significantly faster and smaller, improving both
>> bootstrap time and compilation speed.
>>
>> This change shaves 2% off the size of the text section of libjvm.so on AArch64.
>
> Andrew Haley has updated the pull request incrementally with one additional commit since the last revision:
>
> Update copyright
Changes requested by kbarrett (Reviewer).
src/hotspot/share/asm/register.hpp line 50:
> 48: #define AS_REGISTER(type,name) ((type)name##_##type##EnumValue)
> 49:
> 50: #ifndef USE_EXTERN_CONST_FOR_REGISTER_DEFINITIONS
I can see this conditionalization being useful for development and testing of this change, but why keep it and the old, now dead, code?
-------------
PR: https://git.openjdk.java.net/jdk/pull/4554
More information about the hotspot-compiler-dev
mailing list