Standardized optimization flags in make_defs.mk.

Details:
- Per Dave Love's recommendation in issue #300, this commit defines
    COPTFLAGS := -03
  and
    CRVECFLAGS := $(CKVECFLAGS) -funsafe-loop-optimizations
  in the make_defs.mk for all Intel- and AMD-based configurations.
This commit is contained in:
Field G. Van Zee
2019-02-18 14:52:29 -06:00
parent 565fa3853b
commit 6a014a3377
16 changed files with 62 additions and 10 deletions

View File

@@ -57,7 +57,7 @@ endif
ifeq ($(DEBUG_TYPE),noopt)
COPTFLAGS := -O0
else
COPTFLAGS := -O2 -fomit-frame-pointer
COPTFLAGS := -O3
endif
# Flags specific to optimized kernels.
@@ -74,7 +74,11 @@ endif
# Flags specific to reference kernels.
CROPTFLAGS := $(CKOPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CRVECFLAGS := $(CKVECFLAGS) -funsafe-loop-optimizations
else
CRVECFLAGS := $(CKVECFLAGS)
endif
# Store all of the variables here to new variables containing the
# configuration name.

View File

@@ -57,7 +57,7 @@ endif
ifeq ($(DEBUG_TYPE),noopt)
COPTFLAGS := -O0
else
COPTFLAGS := -O2 -funroll-all-loops
COPTFLAGS := -O3
endif
# Flags specific to optimized kernels.
@@ -74,7 +74,11 @@ endif
# Flags specific to reference kernels.
CROPTFLAGS := $(CKOPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CRVECFLAGS := $(CKVECFLAGS) -funsafe-loop-optimizations
else
CRVECFLAGS := $(CKVECFLAGS)
endif
# Store all of the variables here to new variables containing the
# configuration name.

View File

@@ -57,7 +57,7 @@ endif
ifeq ($(DEBUG_TYPE),noopt)
COPTFLAGS := -O0
else
COPTFLAGS := -O2 -fomit-frame-pointer
COPTFLAGS := -O3
endif
# Flags specific to optimized kernels.
@@ -74,7 +74,11 @@ endif
# Flags specific to reference kernels.
CROPTFLAGS := $(CKOPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CRVECFLAGS := $(CKVECFLAGS) -funsafe-loop-optimizations
else
CRVECFLAGS := $(CKVECFLAGS)
endif
# Store all of the variables here to new variables containing the
# configuration name.

View File

@@ -78,7 +78,11 @@ endif
# Flags specific to reference kernels.
CROPTFLAGS := $(CKOPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CRVECFLAGS := $(CKVECFLAGS) -funsafe-loop-optimizations
else
CRVECFLAGS := $(CKVECFLAGS)
endif
# Store all of the variables here to new variables containing the
# configuration name.

View File

@@ -78,7 +78,11 @@ endif
# Flags specific to reference kernels.
CROPTFLAGS := $(CKOPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CRVECFLAGS := $(CKVECFLAGS) -funsafe-loop-optimizations
else
CRVECFLAGS := $(CKVECFLAGS)
endif
# Store all of the variables here to new variables containing the
# configuration name.

View File

@@ -78,7 +78,11 @@ endif
# Flags specific to reference kernels.
CROPTFLAGS := $(CKOPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CRVECFLAGS := $(CKVECFLAGS) -funsafe-loop-optimizations
else
CRVECFLAGS := $(CKVECFLAGS)
endif
# Store all of the variables here to new variables containing the
# configuration name.

View File

@@ -70,7 +70,11 @@ endif
# Flags specific to reference kernels.
CROPTFLAGS := $(CKOPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CRVECFLAGS := $(CKVECFLAGS) -funsafe-loop-optimizations
else
CRVECFLAGS := $(CKVECFLAGS)
endif
# Override the default value for LDFLAGS.
LDFLAGS := -mmic

View File

@@ -99,7 +99,7 @@ endif
# Note: We use AVX2 for reference kernels instead of AVX-512.
CROPTFLAGS := $(CKOPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CRVECFLAGS := -march=knl -mno-avx512f -mno-avx512pf -mno-avx512er -mno-avx512cd
CRVECFLAGS := -march=knl -mno-avx512f -mno-avx512pf -mno-avx512er -mno-avx512cd -funsafe-loop-optimizations
else
ifeq ($(CC_VENDOR),icc)
CRVECFLAGS := -xMIC-AVX512

View File

@@ -57,7 +57,7 @@ endif
ifeq ($(DEBUG_TYPE),noopt)
COPTFLAGS := -O0
else
COPTFLAGS := -O2 -fomit-frame-pointer
COPTFLAGS := -O3
endif
# Flags specific to optimized kernels.
@@ -78,7 +78,11 @@ endif
# Flags specific to reference kernels.
CROPTFLAGS := $(CKOPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CRVECFLAGS := $(CKVECFLAGS) -funsafe-loop-optimizations
else
CRVECFLAGS := $(CKVECFLAGS)
endif
# Store all of the variables here to new variables containing the
# configuration name.

View File

@@ -57,7 +57,7 @@ endif
ifeq ($(DEBUG_TYPE),noopt)
COPTFLAGS := -O0
else
COPTFLAGS := -O2 -fomit-frame-pointer
COPTFLAGS := -O3
endif
# Flags specific to optimized kernels.
@@ -74,7 +74,11 @@ endif
# Flags specific to reference kernels.
CROPTFLAGS := $(CKOPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CRVECFLAGS := $(CKVECFLAGS) -funsafe-loop-optimizations
else
CRVECFLAGS := $(CKVECFLAGS)
endif
# Store all of the variables here to new variables containing the
# configuration name.

View File

@@ -78,7 +78,11 @@ endif
# Flags specific to reference kernels.
CROPTFLAGS := $(CKOPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CRVECFLAGS := $(CKVECFLAGS) -funsafe-loop-optimizations
else
CRVECFLAGS := $(CKVECFLAGS)
endif
# Store all of the variables here to new variables containing the
# configuration name.

View File

@@ -89,7 +89,7 @@ endif
# to overcome the AVX-512 frequency drop". (Issue #187)
CROPTFLAGS := $(CKOPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CRVECFLAGS := -march=skylake-avx512 -mno-avx512f -mno-avx512vl -mno-avx512bw -mno-avx512dq -mno-avx512cd
CRVECFLAGS := -march=skylake-avx512 -mno-avx512f -mno-avx512vl -mno-avx512bw -mno-avx512dq -mno-avx512cd -funsafe-loop-optimizations
else
ifeq ($(CC_VENDOR),icc)
CRVECFLAGS := -xCORE-AVX2

View File

@@ -57,7 +57,7 @@ endif
ifeq ($(DEBUG_TYPE),noopt)
COPTFLAGS := -O0
else
COPTFLAGS := -O2 -fomit-frame-pointer
COPTFLAGS := -O3
endif
# Flags specific to optimized kernels.
@@ -74,7 +74,11 @@ endif
# Flags specific to reference kernels.
CROPTFLAGS := $(CKOPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CRVECFLAGS := $(CKVECFLAGS) -funsafe-loop-optimizations
else
CRVECFLAGS := $(CKVECFLAGS)
endif
# Store all of the variables here to new variables containing the
# configuration name.

View File

@@ -57,7 +57,7 @@ endif
ifeq ($(DEBUG_TYPE),noopt)
COPTFLAGS := -O0
else
COPTFLAGS := -O2
COPTFLAGS := -O3
endif
# Flags specific to optimized kernels.

View File

@@ -78,7 +78,11 @@ endif
# Flags specific to reference kernels.
CROPTFLAGS := $(CKOPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CRVECFLAGS := $(CKVECFLAGS) -funsafe-loop-optimizations
else
CRVECFLAGS := $(CKVECFLAGS)
endif
# Store all of the variables here to new variables containing the
# configuration name.

View File

@@ -57,7 +57,7 @@ endif
ifeq ($(DEBUG_TYPE),noopt)
COPTFLAGS := -O0
else
COPTFLAGS := -O3 -fomit-frame-pointer
COPTFLAGS := -O3
endif
# Flags specific to optimized kernels.
@@ -78,7 +78,11 @@ endif
# Flags specific to reference kernels.
CROPTFLAGS := $(CKOPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CRVECFLAGS := $(CKVECFLAGS) -funsafe-loop-optimizations
else
CRVECFLAGS := $(CKVECFLAGS)
endif
# Store all of the variables here to new variables containing the
# configuration name.