RFR: 8353188: C1: Clean up x86 backend after 32-bit x86 removal

Vladimir Ivanov vlivanov at openjdk.org
Mon Mar 31 21:27:19 UTC 2025


On Fri, 28 Mar 2025 17:11:14 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Piece-wise cleanup of C1_LIRAssembler_x86, C1_MacroAssembler and related classes. C1 implements the bulk of arch-specific backend there. Major parts of this backend are already removed by #24274, this cleans up another large bulk, and hopefully most of it.
> 
> Additional testing:
>  - [x] Linux x86_64 server fastdebug, `all`
>  - [x] Linux x86_64 server fastdebug, `all` + `-XX:TieredStopAtLevel=1`

Looks good.

src/hotspot/cpu/x86/c1_FrameMap_x86.cpp line 45:

> 43:     Register reg = r_1->as_Register();
> 44:     if (r_2->is_Register() && (type == T_LONG || type == T_DOUBLE)) {
> 45:       Register reg2 = r_2->as_Register();

FTR `reg2` is unused. (Moreover, `r_2` and `r_2->is_Register()` are redundant on x64.)

src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp line 827:

> 825:       // compressed klass ptrs: T_METADATA can be a compressed klass
> 826:       // ptr or a 64 bit method pointer.
> 827:       ShouldNotReachHere();

Alternatively, you could drop the whole `T_METADATA` case and defer the handling to default case.

src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp line 3063:

> 3061:              ExternalAddress((address)double_signflip_pool),
> 3062:              rscratch1);
> 3063: 

Is it intentional or just a leftover?

-------------

Marked as reviewed by vlivanov (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24301#pullrequestreview-2730522710
PR Review Comment: https://git.openjdk.org/jdk/pull/24301#discussion_r2021774792
PR Review Comment: https://git.openjdk.org/jdk/pull/24301#discussion_r2021778835
PR Review Comment: https://git.openjdk.org/jdk/pull/24301#discussion_r2021781614


More information about the hotspot-compiler-dev mailing list