[llvm-dev] Question
Thomas Krüger via llvm-dev
llvm-dev at lists.llvm.org
Tue Jul 18 10:02:34 PDT 2017
Hi Samaneh,
please "use" the subject in your emails and try to be a little bit more
exactly what your email is about. Just "question" or "function" as a
email subject could be extended by some text. :)
Thanks in advance and best regards,
Thomas
Am 18.07.2017 17:41 schrieb Samaneh Berenjian via llvm-dev:
> Hello all,
> I am trying to use optimization passes of llvmlite for my own program.
> I have deifned 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. Does anyone know why this happens?
>
> --
> This email was Anti Virus checked by Security Gateway.
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
More information about the llvm-dev
mailing list