Makefile: Use -O3 optimization for CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
-O3 is much more stable with modern compilers these days than it was a decade ago. Using -O3 on the kernel results in significantly improved hackbench performance, which is a sign that overall performance in the kernel is improved. It works especially well in conjunction with LTO. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
This commit is contained in:
parent
67d97cca47
commit
938a706b23
1 changed files with 1 additions and 1 deletions
2
Makefile
2
Makefile
|
@ -703,7 +703,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, zero-length-bounds)
|
||||||
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
||||||
KBUILD_CFLAGS += -Os
|
KBUILD_CFLAGS += -Os
|
||||||
else
|
else
|
||||||
KBUILD_CFLAGS += -O2
|
KBUILD_CFLAGS += -O3
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Tell gcc to never replace conditional load with a non-conditional one
|
# Tell gcc to never replace conditional load with a non-conditional one
|
||||||
|
|
Loading…
Reference in a new issue