提交 971f7cc1 编写于 作者: S sgehwolf

8210416: [linux] Poor StrictMath performance due to non-optimized compilation

Summary: Compile fdlibm with -O3 and relevant C flags on gcc arches.
Reviewed-by: mbaesken, andrew
上级 2430b098
...@@ -36,12 +36,13 @@ ifeq ($(OPENJDK_TARGET_OS), solaris) ...@@ -36,12 +36,13 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
endif endif
ifeq ($(OPENJDK_TARGET_OS), linux)
ifeq ($(OPENJDK_TARGET_CPU), ppc64) # If FDLIBM_CFLAGS is non-empty we know that we can optimize
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH # fdlibm when adding those extra C flags. Currently GCC only.
else ifeq ($(OPENJDK_TARGET_CPU), ppc64le) LIBFDLIBM_CFLAGS :=
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH ifneq ($(FDLIBM_CFLAGS), )
endif BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
LIBFDLIBM_CFLAGS := $(FDLIBM_CFLAGS)
endif endif
ifneq ($(OPENJDK_TARGET_OS), macosx) ifneq ($(OPENJDK_TARGET_OS), macosx)
...@@ -60,8 +61,7 @@ ifneq ($(OPENJDK_TARGET_OS), macosx) ...@@ -60,8 +61,7 @@ ifneq ($(OPENJDK_TARGET_OS), macosx)
-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include, \ -I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include, \
CFLAGS_windows_debug := -DLOGGING, \ CFLAGS_windows_debug := -DLOGGING, \
CFLAGS_aix := -qfloat=nomaf, \ CFLAGS_aix := -qfloat=nomaf, \
CFLAGS_linux_ppc64 := -mno-fused-madd -fno-strict-aliasing, \ CFLAGS_linux := $(LIBFDLIBM_CFLAGS), \
CFLAGS_linux_ppc64le := -ffp-contract=off, \
ARFLAGS := $(ARFLAGS), \ ARFLAGS := $(ARFLAGS), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \ OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册