U
    ?h                     @   s(   d Z ddlmZ d
ddZdddZd	S )aH  
Useful options to debug LLVM passes

llvm.set_option("test", "-debug-pass=Details")
llvm.set_option("test", "-debug-pass=Executions")
llvm.set_option("test", "-debug-pass=Arguments")
llvm.set_option("test", "-debug-pass=Structure")
llvm.set_option("test", "-debug-only=loop-vectorize")
llvm.set_option("test", "-help-hidden")

    )bindingc                 C   s(   | dkrdS |dkrdS |dkr$dS dS )z
    Compute the inlining threshold for the desired optimisation level

    Refer to http://llvm.org/docs/doxygen/html/InlineSimple_8cpp_source.html
       i     K          )ZoptlevelZ	sizelevelr   r   J/var/www/html/venv/lib/python3.8/site-packages/numba/core/llvm_bindings.py_inlining_threshold   s    r
   r   Fc                 C   s(   t  }| |_||_||_t| |_|S )zV
    Create an LLVM pass manager with the desired optimisation level and options.
    )llvmcreate_pass_manager_builder	opt_levelloop_vectorizeslp_vectorizer
   Zinlining_threshold)optr   r   Zpmbr   r   r	   r   $   s    
r   N)r   )r   FF)__doc__Zllvmliter   r   r
   r   r   r   r   r	   <module>   s
   
  