aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2021-11-19 18:46:00 +0100
committerMartin Jambor <mjambor@suse.cz>2021-11-19 18:46:08 +0100
commit458d2c689963d8461d84670a3d8988cd6ecbfd81 (patch)
treeb8ec5d2ae9baec63f98dd08e1075b35e6cfaca9d /gcc/opts.c
parentada63d56beb0e535d35b165b55f85e29a0b36929 (diff)
downloadgcc-458d2c689963d8461d84670a3d8988cd6ecbfd81.zip
gcc-458d2c689963d8461d84670a3d8988cd6ecbfd81.tar.gz
gcc-458d2c689963d8461d84670a3d8988cd6ecbfd81.tar.bz2
options: Make -Ofast switch off -fsemantic-interposition
Using -fno-semantic-interposition has been reported by various people to bring about considerable speed up at the cost of strict compliance to the ELF symbol interposition rules See for example https://fedoraproject.org/wiki/Changes/PythonNoSemanticInterpositionSpeedup As such I believe it should be implied by our -Ofast optimization level, not only so that benchmarks that can benefit run faster, but also so that people looking at -Ofast documentation for options that could speed their programs find it. gcc/ChangeLog: 2021-11-12 Martin Jambor <mjambor@suse.cz> * opts.c (default_options_table): Switch off flag_semantic_interposition at Ofast. * doc/invoke.texi (Optimize Options): Document that Ofast switches off -fsemantic-interposition.
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index 175b463..b16497e 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -682,6 +682,7 @@ static const struct default_options default_options_table[] =
/* -Ofast adds optimizations to -O3. */
{ OPT_LEVELS_FAST, OPT_ffast_math, NULL, 1 },
{ OPT_LEVELS_FAST, OPT_fallow_store_data_races, NULL, 1 },
+ { OPT_LEVELS_FAST, OPT_fsemantic_interposition, NULL, 0 },
{ OPT_LEVELS_NONE, 0, NULL, 0 }
};