[llvm-dev] llvmlite pass manager

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[llvm-dev] llvmlite pass manager

George Karpenkov via llvm-dev
​Dear all,

I have written a code and used a function for pass manager in llvmlite. I used the following 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)
    pmb.add_global_dce_pass = add_global_dce_pass
    pmb.add_global_optimizer_pass = add_global_optimizer_pass
    pmb.add_ipsccp_pass = add_ipsccp_pass
    return pmb


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


I tried to run my module pass manager. However, when i change the level of optimization, I can not see any differences on output of my code in term of optimization.  I think there should be a difference between opt-level = 0 and opt-level = 3. does anyone have any idea about that?

Best Regards

-- 
This email was Anti Virus checked by  Security Gateway.

_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Loading...