From a9430bb25e48cfacfc1e4571f716693d3330d483 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Fri, 20 Feb 2015 19:47:54 +0100 Subject: [PATCH] cmake: use O2 instead of every compiler flags It was done to avoid issue with specific compiler flags. I think it is safe to reenable it now. There are some flags that are still disabled that potentially could be re-enabled: -fno-guess-branch-probability -fno-dse -fno-tree-dse But it will be for another PR --- common/src/Utilities/CMakeLists.txt | 43 +--------------------------- common/src/x86emitter/CMakeLists.txt | 43 +--------------------------- pcsx2/CMakeLists.txt | 42 +-------------------------- 3 files changed, 3 insertions(+), 125 deletions(-) diff --git a/common/src/Utilities/CMakeLists.txt b/common/src/Utilities/CMakeLists.txt index 8f976041c6..4e73207472 100644 --- a/common/src/Utilities/CMakeLists.txt +++ b/common/src/Utilities/CMakeLists.txt @@ -6,54 +6,13 @@ if(NOT TOP_CMAKE_WAS_SOURCED) endif(NOT TOP_CMAKE_WAS_SOURCED) -# library name set(Output Utilities) -# set common flags set(CommonFlags -fno-strict-aliasing ) -# set optimization flags -set(OptimizationFlags - -falign-functions - -falign-jumps - -falign-labels - -falign-loops - -fcaller-saves - -fcprop-registers - -fcrossjumping - -fcse-follow-jumps - -fcse-skip-blocks - -fdefer-pop - -fdelete-null-pointer-checks - -fgcse - -fgcse-lm - -fif-conversion - -fif-conversion2 - -fmerge-constants - -foptimize-sibling-calls - -fpeephole2 - -fregmove - -freorder-blocks - -freorder-functions - -frerun-cse-after-loop - -fsched-interblock - -fsched-spec - -fstrict-overflow - -fthread-jumps - -ftree-ccp - -ftree-ch - -ftree-copyrename - -ftree-dce - -ftree-dominator-opts - -ftree-fre - -ftree-lrs - -ftree-pre - -ftree-sra - -ftree-ter - -ftree-vrp - -funit-at-a-time) +set(OptimizationFlags -O2) #Clang doesn't support a few common flags that GCC does. if(NOT USE_CLANG) diff --git a/common/src/x86emitter/CMakeLists.txt b/common/src/x86emitter/CMakeLists.txt index b37e22ad3e..1a8cb0da13 100644 --- a/common/src/x86emitter/CMakeLists.txt +++ b/common/src/x86emitter/CMakeLists.txt @@ -6,54 +6,13 @@ if(NOT TOP_CMAKE_WAS_SOURCED) endif(NOT TOP_CMAKE_WAS_SOURCED) -# library name set(Output x86emitter) -# set common flags set(CommonFlags -fno-strict-aliasing ) -# set optimization flags -set(OptimizationFlags - -falign-functions - -falign-jumps - -falign-labels - -falign-loops - -fcaller-saves - -fcprop-registers - -fcrossjumping - -fcse-follow-jumps - -fcse-skip-blocks - -fdefer-pop - -fdelete-null-pointer-checks - -fgcse - -fgcse-lm - -fif-conversion - -fif-conversion2 - -fmerge-constants - -foptimize-sibling-calls - -fpeephole2 - -fregmove - -freorder-blocks - -freorder-functions - -frerun-cse-after-loop - -fsched-interblock - -fsched-spec - -fstrict-overflow - -fthread-jumps - -ftree-ccp - -ftree-ch - -ftree-copyrename - -ftree-dce - -ftree-dominator-opts - -ftree-fre - -ftree-lrs - -ftree-pre - -ftree-sra - -ftree-ter - -ftree-vrp - -funit-at-a-time) +set(OptimizationFlags -O2) #Clang doesn't support a few common flags that GCC does. if(NOT USE_CLANG) diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index 871713e09c..45b27fbe5e 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -12,7 +12,6 @@ if(NOT TOP_CMAKE_WAS_SOURCED) endif() -# set common flags set(CommonFlags # GCC-4.6 crash pcsx2 during the binding of plugins at startup... # Disable this optimization for the moment @@ -27,46 +26,7 @@ set(CommonFlags -DWX_PRECOMP ) -# set optimization flags -set(OptimizationFlags - -falign-functions - -falign-jumps - -falign-labels - -falign-loops - -fcaller-saves - -fcprop-registers - -fcrossjumping - -fcse-follow-jumps - -fcse-skip-blocks - -fdefer-pop - -fdelete-null-pointer-checks - -fgcse - -fgcse-lm - -fif-conversion - -fif-conversion2 - -fmerge-constants - -foptimize-sibling-calls - -fpeephole2 - -fregmove - -freorder-blocks - -freorder-functions - -frerun-cse-after-loop - -fsched-interblock - -fsched-spec - -fstrict-overflow - -fthread-jumps - -ftree-ccp - -ftree-ch - -ftree-copyrename - -ftree-dce - -ftree-dominator-opts - -ftree-fre - -ftree-lrs - -ftree-pre - -ftree-sra - -ftree-ter - -ftree-vrp - -funit-at-a-time) +set(OptimizationFlags -O2) #Clang doesn't support a few common flags that GCC does. if(NOT USE_CLANG)