0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 08:12:37 +01:00

configure: Tweak gcc optimization options.

This commit is contained in:
Jason Volk 2019-10-08 19:45:18 -07:00
parent 51e62a56f6
commit fb13b1158e

View file

@ -569,23 +569,34 @@ AM_COND_IF([OPTIMIZE],
[ [
CXXFLAGS+=" -fgcse-sm" CXXFLAGS+=" -fgcse-sm"
CXXFLAGS+=" -fgcse-las" CXXFLAGS+=" -fgcse-las"
CXXFLAGS+=" -frename-registers"
CXXFLAGS+=" -fsched-stalled-insns=0" CXXFLAGS+=" -fsched-stalled-insns=0"
CXXFLAGS+=" -fsched-pressure"
CXXFLAGS+=" -fsched-spec-load"
dnl CXXFLAGS+=" -fsched2-use-superblocks"
dnl CXXFLAGS+=" -fsched2-use-superblocks"
CXXFLAGS+=" -fira-hoist-pressure" CXXFLAGS+=" -fira-hoist-pressure"
CXXFLAGS+=" -fbranch-target-load-optimize" CXXFLAGS+=" -fbranch-target-load-optimize"
CXXFLAGS+=" -frerun-loop-opt" CXXFLAGS+=" -frerun-loop-opt"
CXXFLAGS+=" -fdevirtualize-at-ltrans" CXXFLAGS+=" -fdevirtualize-at-ltrans"
dnl CXXFLAGS+=" -fbtr-bb-exclusive"
CXXFLAGS+=" -fipa-pta"
CXXFLAGS+=" -fmodulo-sched"
CXXFLAGS+=" -fmodulo-sched-allow-regmoves"
CXXFLAGS+=" -ftracer"
dnl Optimization options that aren't compatible with debugging. dnl Optimization options that aren't compatible with debugging.
AM_COND_IF([DEBUG], [], AM_COND_IF([DEBUG], [],
[ [
dnl CXXFLAGS+=" -fweb"
CXXFLAGS+="" CXXFLAGS+=""
]) ])
]) ])
], [ ], [
optimize="no" optimize="no"
CXXFLAGS+=" -falign-functions" CXXFLAGS+=" -falign-functions"
CXXFLAGS+=" -falign-labels"
CXXFLAGS+=" -falign-loops"
CXXFLAGS+=" -falign-jumps"
CXXFLAGS+=" -fsection-anchors"
]) ])
dnl dnl
@ -631,6 +642,11 @@ AM_COND_IF([GCC],
CXXFLAGS+=" -fstack-protector-explicit" CXXFLAGS+=" -fstack-protector-explicit"
]) ])
AM_COND_IF([GCC],
[
CXXFLAGS+=" -fvtable-verify=none"
])
dnl -fvisibility-inlines-hidden - for optimization; note the address of inline dnl -fvisibility-inlines-hidden - for optimization; note the address of inline
dnl functions won't be the same between translation units dnl functions won't be the same between translation units
CXXFLAGS+=" -fvisibility-inlines-hidden" CXXFLAGS+=" -fvisibility-inlines-hidden"
@ -1987,6 +2003,7 @@ AM_COND_IF([GCC],
AM_COND_IF([LOWMEM_COMPILE], AM_COND_IF([LOWMEM_COMPILE],
[ [
SPIRIT_UNIT_CXXFLAGS+=" --param ggc-min-expand=1" SPIRIT_UNIT_CXXFLAGS+=" --param ggc-min-expand=1"
SPIRIT_UNIT_CXXFLAGS+=" -fno-ipa-pta"
]) ])
]) ])