Skip to content

Commit

Permalink
compiler.testbench.perf_embedding: more fine grained reporting.
Browse files Browse the repository at this point in the history
whitequark committed Jul 11, 2016
1 parent b5901db commit eceafad
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions artiq/compiler/testbench/perf_embedding.py
Original file line number Diff line number Diff line change
@@ -38,15 +38,28 @@ def embed():

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")

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()

0 comments on commit eceafad

Please sign in to comment.