From c5ba44b8a6eaf18472f4993fcb23aff92ec8eac8 Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 11 Jul 2016 17:55:18 +0000 Subject: [PATCH] compiler.testbench.perf_embedding: more fine grained reporting. --- artiq/compiler/testbench/perf_embedding.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/artiq/compiler/testbench/perf_embedding.py b/artiq/compiler/testbench/perf_embedding.py index cbbb01f96..81c0c02db 100644 --- a/artiq/compiler/testbench/perf_embedding.py +++ b/artiq/compiler/testbench/perf_embedding.py @@ -44,6 +44,10 @@ def main(): stitcher = embed() module = Module(stitcher) + target = OR1KTarget() + llvm_ir = target.compile(module) + elf_obj = target.assemble(llvm_ir) + elf_shlib = target.link([elf_obj], init_fn=module.entry_point()) benchmark(lambda: embed(), "ARTIQ embedding") @@ -51,8 +55,17 @@ def main(): benchmark(lambda: Module(stitcher), "ARTIQ transforms and validators") - benchmark(lambda: OR1KTarget().compile_and_link([module]), - "LLVM optimization and linking") + benchmark(lambda: target.compile(module), + "LLVM optimizations") + + benchmark(lambda: target.assemble(llvm_ir), + "LLVM machine code emission") + + benchmark(lambda: target.link([elf_obj], init_fn=module.entry_point()), + "Linking") + + benchmark(lambda: target.strip(elf_shlib), + "Stripping debug information") if __name__ == "__main__": main()