RFR(M): 8160245: C1: Clean up platform #defines in c1_LIR.hpp.

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Wed Jun 29 07:23:18 UTC 2016


I changed this to 'Enhancement'.
Also, I found another, very similar cleanup which I added to this change:
generate_stack_overflow_check() in templateInterpreterGenerator.hpp.
I added default parameters noreg so that the signature is the same for all
I think it makes sense to add this because aarch and the closed platforms 
need to be tested with this, and this way double work can be avoided.

I would appreciate to get a review for this rather simple change!

Best regards,

> -----Original Message-----
> From: hotspot-compiler-dev [mailto:hotspot-compiler-dev-
> bounces at openjdk.java.net] On Behalf Of Lindenmaier, Goetz
> Sent: Freitag, 24. Juni 2016 16:35
> To: hotspot-compiler-dev at openjdk.java.net
> Subject: RE: RFR(M): 8160245: C1: Clean up platform #defines in c1_LIR.hpp.
> Sorry, the webrev URL was missing, added below:
> Hi,
> c1_LIR.hpp defines a row of functions guarded by platform
> defines. This is bad style and hinders new platform ports.
> (I'm working on S390 aka Z :))
> This change removes the majority of these defines. It introduces
> common headers, and moves implementations to c1_LIR_<cpu>.cpp files.
> It guards single_softfp() and double_softfp() by __SOFTFP__.
> This is not used in any openJdk platform. I can not test this
> on the closed platforms ARM32 and PPC32.
> It removes the guard around the LIR_Address constructor. There
> is no point in guarding this code, verify() assures by
> assertions that it can not be misused. I also introduce a new
> constructor that leaves out the scale argument and introduced
> some usages on X86.
> This change also moves verify() to the new platform files. In the
> header, LIR_ADDRESS_PD_VERIFY was used to guard usage
> of pd_verify(). Neither of these are used in openJdk. If this define
> is used in the closed ports pd_verify() must be renamed to verify().
> The code that was previously guarded by ARM, ARM32 or PPC32 is
> moved to a properly guarded section in c1_LIR.cpp. Actually,
> it should be moved to according new files c1_LIR_<cpu>.cpp in
> the closed ports. But this way the change should basically
> work for the closed ports.
> I added fnoreg on x86 to note down the code similarly on all
> Platforms.
> I cleaned up a flag with a limited range on PPC_32.
> Please review this change. I please need a sponsor.
> https://bugs.openjdk.java.net/browse/JDK-8160245
> http://cr.openjdk.java.net/~goetz/wr16/8160245-simplifyC1/webrev.01/
> I built and tested this on linuxx86_64, solaris_sparc and the ppc platforms.
> Best regards,
>   Goetz

More information about the hotspot-compiler-dev mailing list