RFR: 8283740: C1: Convert flag TwoOperandLIRForm to a constant on all platforms

Damon Fenacci duke at openjdk.org
Mon Dec 19 08:46:49 UTC 2022


On Wed, 14 Dec 2022 13:39:26 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> The  _TwoOperandLIRForm_ flag (LIR requires src1 and dst to match in binary LIR ops) can be set at runtime but each platform defines a default value that is the only one accepted. Although some platform could theoretically support both, there is no realistic scenario for this.
>> The flag is removed in favour of a constant. This is defined as enum and its assigned value is defined in the platform-specific def.
>
> And FTR:
> 
> Due to bugs in certain (very old) compilers, there is widespread use of enums and avoidance of in-class initialization of static integral constant members. Compilers having such bugs are no longer supported. Except where an enum is semantically appropriate, new code should use integral constants.
> 
> https://github.com/openjdk/jdk/blob/master/doc/hotspot-style.md

@TobiHartmann @chhagedorn thanks for the review!

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

PR: https://git.openjdk.org/jdk/pull/11671


More information about the hotspot-dev mailing list