
    i                     R    S SK Jr  S SKJrJr   " S S\5      r " S S\5      rS rg)	    )ir)VisitorCallVisitorc                   8    \ rS rSrSr\" / SQ5      rS rS rSr	g)FastFloatBinOpVisitor   zV
A pass to add fastmath flag to float-binop instruction if they don't have
any flags.
)faddfsubfmulfdivfremfcmpc                     Xl         g Nflagsselfr   s     R/var/www/html/trading/venv/lib/python3.13/site-packages/numba/core/fastmathpass.py__init__FastFloatBinOpVisitor.__init__       
    c                     UR                   U R                  ;   aA  UR                  (       d/  U R                   H  nUR                  R                  U5        M      g g g r   )opnamefloat_binopsr   appendr   instrflags      r   visit_Instruction'FastFloatBinOpVisitor.visit_Instruction   sE    <<4,,,;; JJDKK&&t, '  -r   r   N)
__name__
__module____qualname____firstlineno____doc__	frozensetr   r   r!   __static_attributes__ r   r   r   r      s     MNL-r   r   c                   $    \ rS rSrSrS rS rSrg)FastFloatCallVisitor   z<
A pass to change all float function calls to use fastmath.
c                     Xl         g r   r   r   s     r   r   FastFloatCallVisitor.__init__   r   r   c                     UR                   [        R                  " 5       [        R                  " 5       4;   a/  U R                   H  nUR
                  R                  U5        M      g g r   )typer   	FloatType
DoubleTyper   fastmathaddr   s      r   
visit_CallFastFloatCallVisitor.visit_Call   sD    ::",,."--/::

""4( # ;r   r   N)r#   r$   r%   r&   r'   r   r6   r)   r*   r   r   r,   r,      s    )r   r,   c                     UR                   n[        U5      R                  U 5        [        U5      R                  U 5        g)z;
Rewrite the given LLVM module to use fastmath everywhere.
N)r   r   visitr,   )modoptionsr   s      r   rewrite_moduler<   %   s3     MME% &&s+%%c*r   N)llvmliter   llvmlite.ir.transformsr   r   r   r,   r<   r*   r   r   <module>r?      s(     7-G -"); )+r   