Skip to content

Commit 72291a2

Browse files
committed
refactor vector disabling code
1 parent 1446d22 commit 72291a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/shared.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,8 @@ class Building:
842842
COMPILER_TEST_OPTS = [] # For use of the test runner
843843
JS_ENGINE_OVERRIDE = None # Used to pass the JS engine override from runner.py -> test_benchmark.py
844844

845+
SAFE_OPT_OPTS = ['-disable-loop-vectorization', '-disable-slp-vectorization'] # llvm 3.4
846+
845847
@staticmethod
846848
def get_building_env(native=False):
847849
env = os.environ.copy()
@@ -1163,7 +1165,7 @@ def llvm_opt(filename, opts, out=None):
11631165
if type(opts) is int:
11641166
opts = Building.pick_llvm_opts(opts)
11651167
#opts += ['-debug-pass=Arguments']
1166-
opts += ['-disable-loop-vectorization', '-disable-slp-vectorization']
1168+
opts += Building.SAFE_OPT_OPTS
11671169
logging.debug('emcc: LLVM opts: ' + str(opts))
11681170
target = out or (filename + '.opt.bc')
11691171
output = Popen([LLVM_OPT, filename] + opts + ['-o', target], stdout=PIPE).communicate()[0]

0 commit comments

Comments
 (0)