From 018f6d9f797a49fb5e78f3616fe4f4e9fae35f70 Mon Sep 17 00:00:00 2001 From: Andrew Morrow Date: Sun, 21 Feb 2021 12:37:53 -0500 Subject: [PATCH] SERVER-55131 Add an experiment for enabling -ftree-vectorize when optimization is enabled --- SConstruct | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SConstruct b/SConstruct index 6898453080f..2aea0c8e965 100644 --- a/SConstruct +++ b/SConstruct @@ -274,6 +274,7 @@ add_option('opt', experimental_optimizations = [ 'sandybridge', + 'treevec', ] experimental_optimization_choices = ['*'] experimental_optimization_choices.extend("+" + opt for opt in experimental_optimizations) @@ -2486,6 +2487,9 @@ if env.TargetOSIs('posix'): else: env.Append( CCFLAGS=["-O0"] ) + if optBuild and "treevec" in selected_experimental_optimizations: + env.Append(CCFLAGS=["-ftree-vectorize"]) + # Promote linker warnings into errors. We can't yet do this on OS X because its linker considers # noall_load obsolete and warns about it. if not has_option("disable-warnings-as-errors"):