o
    Û¾i™  ã                   @   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   é   éá   © )ÚoptlevelÚ	sizelevelr   r   úL/home/ubuntu/.local/lib/python3.10/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   Úinlining_threshold)Úoptr   r   Úpmbr   r   r   r   $   s   
r   N)r   )r   FF)Ú__doc__Úllvmliter   r   r   r   r   r   r   r   Ú<module>   s    
ÿ