RFR 8014911 - Use SUPPORTS_NATIVE_CX8 to help C++ compiler elide code
Vladimir Kozlov
vladimir.kozlov at oracle.com
Wed Sep 18 09:56:12 PDT 2013
Looks good except indention of new method.
Vladimir
On 9/18/13 9:39 AM, BILL PITTORE wrote:
> Would like a review for this simple fix that leverages the macro
> 'SUPPORTS_NATIVE_CX8' that was added in hotspot revision:
> changeset: 4611:6b388e7d4905
> parent: 4547:e01e02a9fcb6
> user: bpittore
> date: Tue May 07 10:19:33 2013 -0400
> summary: 8013633: Cleanup platform ifdefs in unsafe.cpp
>
> SUPPORTS_NATIVE_CX8 is defined in globalDefinitions_<arch>.hpp based on
> whether the platform supports 64bit cmpxchg natively. This change uses
> the define to force the supports_cx8() function to return hard-coded
> 'true' value. GCC and other compilers will then optimize code that uses
> supports_cx8() function call by removing the actual reference to
> _supports_cx8 variable as well as eliminating code for the
> !supports_cx8() case.
> Webrev is here: http://cr.openjdk.java.net/~bpittore/8014911/webrev.00/
>
> thanks,
> bill
>
More information about the hotspot-runtime-dev
mailing list