llvmlite optimization

0 views
Skip to first unread message

Samaneh Berenjian

unread,
Aug 14, 2017, 12:23:45 PM8/14/17
to numba...@continuum.io
Hi all,

I am trying to use optimization passes of llvmlite for my own program. I have defined the following function for my code as pass function:
def create_pass_manager_builder(opt=3, loop_vectorize=False, slp_vectorize=False):
pmb = llvm.create_pass_manager_builder()
pmb.opt_level = opt
pmb.loop_vectorize = loop_vectorize
pmb.populate = populate
pmb.add_dead_code_elimination_pass = add_dead_code_elimination_pass
pmb.slp_vectorize = slp_vectorize
pmb.inlining_threshold = _inlining_threshold(opt)
return pmb

and I try to run it using the following:

module_ref = llvm1.parse_assembly(str(module))
pmb = llvm.create_pass_manager_builder()
pmb.opt_level = 3
pm = llvm.create_module_pass_manager()
pmb.populate(pm)
pm.run(module_ref)

Having this I do have some optimization for my code. However, when I change the optimization level from 3 to 2 or 0, there is no difference for optimization.How can i change the level of optimization and see the difference?


--
Best Regards
Samaneh Berenjian
Reply all
Reply to author
Forward
0 new messages