Skip to content

Commit 82743f0

Browse files
committed
option to benchmark multiple llvm versions, both native and js
1 parent ce66f8d commit 82743f0

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

tests/runner.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def get_library(self, name, generated_libs, configure=['sh', './configure'], con
352352
generated_libs.append(bc_file)
353353
return generated_libs
354354

355-
print >> sys.stderr, '<building and saving %s into cache> ' % cache_name,
355+
print >> sys.stderr, '<building and saving %s into cache> ' % cache_name
356356

357357
return Building.build_library(name, build_dir, output_dir, generated_libs, configure, configure_args, make, make_args, self.library_cache, cache_name,
358358
copy_project=True, env_init=env_init, native=native)

tests/test_benchmark.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ def __init__(self, name, engine, extra_args=[], env={}):
9090

9191
def build(self, parent, filename, args, shared_args, emcc_args, native_args, native_exec, lib_builder):
9292
self.filename = filename
93-
if lib_builder: emcc_args = emcc_args + lib_builder('js', native=False, env_init={})
93+
llvm_root = self.env.get('LLVM') or LLVM_ROOT
94+
if lib_builder: emcc_args = emcc_args + lib_builder('js_' + llvm_root, native=False, env_init=self.env)
9495

9596
open('hardcode.py', 'w').write('''
9697
def process(filename):
@@ -120,10 +121,16 @@ def run(self, args):
120121

121122
# Benchmarkers
122123
benchmarkers = [
123-
NativeBenchmarker('clang', CLANG_CC, CLANG),
124+
#NativeBenchmarker('clang', CLANG_CC, CLANG),
125+
#NativeBenchmarker('clang-3.2', os.path.join(LLVM_3_2, 'clang'), os.path.join(LLVM_3_2, 'clang++')),
126+
#NativeBenchmarker('clang-3.3', os.path.join(LLVM_3_3, 'clang'), os.path.join(LLVM_3_3, 'clang++')),
127+
#NativeBenchmarker('clang-3.4', os.path.join(LLVM_3_4, 'clang'), os.path.join(LLVM_3_4, 'clang++')),
124128
#NativeBenchmarker('gcc', 'gcc', 'g++'),
125129
#JSBenchmarker('sm-f32', SPIDERMONKEY_ENGINE, ['-s', 'PRECISE_F32=2']),
126-
JSBenchmarker('sm', SPIDERMONKEY_ENGINE),
130+
JSBenchmarker('sm-f32-3.2', SPIDERMONKEY_ENGINE, ['-s', 'PRECISE_F32=2'], env={ 'LLVM': LLVM_3_2 }),
131+
JSBenchmarker('sm-f32-3.3', SPIDERMONKEY_ENGINE, ['-s', 'PRECISE_F32=2'], env={ 'LLVM': LLVM_3_3 }),
132+
JSBenchmarker('sm-f32-3.4', SPIDERMONKEY_ENGINE, ['-s', 'PRECISE_F32=2'], env={ 'LLVM': LLVM_3_4 }),
133+
#JSBenchmarker('sm', SPIDERMONKEY_ENGINE),
127134
#JSBenchmarker('sm-fc', SPIDERMONKEY_ENGINE, env={ 'EMCC_FAST_COMPILER': '1' }),
128135
#JSBenchmarker('sm-noasm', SPIDERMONKEY_ENGINE + ['--no-asmjs']),
129136
#JSBenchmarker('sm-noasm-f32', SPIDERMONKEY_ENGINE + ['--no-asmjs'], ['-s', 'PRECISE_F32=2']),

0 commit comments

Comments
 (0)