aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-01-06 13:37:34 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-01-06 13:37:34 -0800
commit72291a246855c9d3cb3dd8f8ccd0cf513f91442c (patch)
tree0b9e40534b9f2a0df8a879d3467d7c02c5c787ec
parent1446d22751cd78af0a93f3872574f968ee936cb0 (diff)
refactor vector disabling code
-rw-r--r--tools/shared.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/shared.py b/tools/shared.py
index 90618a97..39488ef2 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -842,6 +842,8 @@ class Building:
COMPILER_TEST_OPTS = [] # For use of the test runner
JS_ENGINE_OVERRIDE = None # Used to pass the JS engine override from runner.py -> test_benchmark.py
+ SAFE_OPT_OPTS = ['-disable-loop-vectorization', '-disable-slp-vectorization'] # llvm 3.4
+
@staticmethod
def get_building_env(native=False):
env = os.environ.copy()
@@ -1163,7 +1165,7 @@ class Building:
if type(opts) is int:
opts = Building.pick_llvm_opts(opts)
#opts += ['-debug-pass=Arguments']
- opts += ['-disable-loop-vectorization', '-disable-slp-vectorization']
+ opts += Building.SAFE_OPT_OPTS
logging.debug('emcc: LLVM opts: ' + str(opts))
target = out or (filename + '.opt.bc')
output = Popen([LLVM_OPT, filename] + opts + ['-o', target], stdout=PIPE).communicate()[0]