+
    :i                        ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt	 ^ RI
Ht ^ RIHtHt ^ RIHtHtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
I H!t! ]"! . R(O4      t#R t$R t%R t& ! R R]'4      t( ! R R]R7      t) ! R R])4      t* ! R R]*4      t+ ! R R]*4      t, ! R R]'4      t-R t. ! R R]'4      t/ ! R R]R7      t0 ! R  R!]04      t1 ! R" R#]14      t2 ! R$ R%]14      t3R& t4R' t5R# ))    N)abstractmethodABCMeta)utilsconfigcgutils)create_pass_builder)remove_redundant_nrt_refct)rtsys)require_global_compiler_lock)NumbaInvalidConfigWarning)disassemble_elf_to_cfg)PassTimingsCollectionc                 D    V P                  R 4      ^ ,          pV\        9   # )-)split_x86arch)triplearchs   & P/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/core/codegen.py_is_x86r      s     <<QD8    c                 P   \         P                  P                  R4      p V '       g   ^ # ^ pV  FC  pVP                  4       p V\	        \
        P                  VP                  4       4      ,          pKE  	  V#   \         d$    \        P                  ! RT: 2\        4        Kv  i ; i)zParse refprune flags from the `config`.

Invalid values are ignored an warn via a `NumbaInvalidConfigWarning`
category.

Returns
-------
flags : llvmlite.binding.RefPruneSubpasses
,zinvalid refprune flags )r   LLVM_REFPRUNE_FLAGSr   stripgetattrllRefPruneSubpassesupperAttributeErrorwarningswarnr   )flagsvalitems      r   _parse_refprune_flagsr&       s     &&,,S1E
Czz|	572//>>C  J  	5MM3D8<35	5s   /A77*B%$B%c                 f  a	a
aa \         P                  '       d<    ^ RIp^ RIHo ^ RIHp ^ RIHp ^ RIHo	 ^ RI	H
o
 RVRV/pWb,          oV	V
VV3R	 lpM\        p\        R4       \        V P                  ^PR4      4       V! V4       \        R4       R#   \         d    R
p\        T4      hi ; i)r   N)	highlight)GasLexer)	LlvmLexer)Terminal256Formatter)by_colorschemellvmasmc           
      P   < \        S! V S! 4       S! S! 4       R 7      4      4       R# ))styleN)print)argr+   r,   r(   lexers   &r   printerdump.<locals>.printerH   s%    iUW*1ABD Er   z0Please install pygments to see highlighted dumpsr   zP================================================================================)r   HIGHLIGHT_DUMPSpygmentsr(   pygments.lexersr)   r*   pygments.formattersr+   numba.misc.dump_styler,   ImportError
ValueErrorr1   center)headerbodylangr7   	gas_lexer
llvm_lexer	lexer_mapr4   msgr+   r,   r(   r3   s   &&&      @@@@r   dumprE   8   s    	E
 +=?@<UI>IOEE E 	(O	&--C
 !DM	(O)  	"DCS/!	"s   B B0c                   J   a  ] tR t^St o RtR tR	R ltR
R ltR tR t	Rt
V tR# )_CFGa  
Wraps the CFG graph for different display method.

Instance of the class can be stringified (``__repr__`` is defined) to get
the graph in DOT format.  The ``.display()`` method plots the graph in
PDF.  If in IPython notebook, the returned image can be inlined.
c                    Wn         W n        W0n        VP                  V4      p\        P
                  ! V4      V n        W@n        R # N)cresnamepy_funcget_functionr   get_function_cfgdotkwargs)selfrJ   rK   rL   rP   fns   &&&&, r   __init___CFG.__init__[   s8    		t$&&r*r   Nc	                  aKaLaMaNaOaPaQaRaSaTaUaVaWaX ^ RI oS^ RIoW^ RIp	^ RIp
^ RIHp ^ RIHp ^ RIH	p ^ RI
Hp RpV! VVVVVVVVR7      pV! WR7      oKR	 pV! VV4       V! SKV4       V! R
 4      oNRSNR&   RSNR&   RSNR&   RSNR&   RSNR&   RSNR&   RSNR&   RSNR&   RSNR&   RSNR&   RSNR &   V P                  P                  V P                  4      pV P                  P                  4       pVW3R! lpV! V4      oUVS3R" lpV! V P                  V P                  V4      pSWP!                  R#4      pSWP!                  R$4      pSWP!                  R%4      oVR&pSWP!                  V4      oTSWP!                  R'4      pSWP!                  R(4      pSWP!                  R)4      pSWP!                  R*4      pSWP!                  R+4      pSWP!                  R,4      pSWP!                  R-4      p SWP!                  R.4      p!R/ p"R0 oL/ p#/ p$SKP"                  '       d   V
P%                  V P&                  4      w  oXoQVP(                  ! V4      P+                  R1R24      p%SSP-                  V%4      P/                  R3R47      p&V	P1                  V&P3                  R54      4      p'^ p(V'R6,           EF$  p)RURUuoPoOV)R7,          p*V)R8,          p+V)R9,          p,V+V#V,&   V*^RU p*V*P5                  R:4      p-. p.^oMR2p/VP7                  V-RU,          4      p0T-p1V0e   V0P9                  4       ^ ,          p2V2P5                  R;4      p3\;        V34      oMR<p4. p5VP<                  '       d   R=SNR,          R>SNR,          /p6M/ p6V3 FY  p7VP7                  V74      P9                  4       w  p8p9V6P?                  V9R?4      p:V5PA                  V4PC                  V:V8V94      4       K[  	  R2PE                  V54      p/V-RRU p1R@p;V.PA                  V;PC                  SNRA,          SMSL! V1^ ,          PG                  4       4      4      4       RBoRVKVLVMVNVOVPVQVRVTVUVVVX3RC lp<V1RD,           EF  p=VP7                  V=4      '       d   K  SKPH                  '       g   SKP"                  '       d   V<! V=V.4      p>V>e   V>w  oPoOVPJ                  '       d#   VPM                  V=4      '       d   SNR,          p?EM<VPN                  '       d#   VPM                  V=4      '       d   SNR,          p?EMVPP                  '       d"   VPM                  V=4      '       d   SNR,          p?MVPR                  '       d"   V PM                  V=4      '       d   SNR,          p?MVPT                  '       d"   V!PM                  V=4      '       d   SNR,          p?MoVPV                  '       d"   VPM                  V=4      '       d   SNR,          p?M<VPX                  '       d"   VPM                  V=4      '       d   SNR ,          p?M	SNRA,          p?V?SNRA,          Jg   V'       d   EK  V"! SL! V=4      4       F%  p@V.PA                  SRPC                  V?SMV@4      4       K'  	  EK  	  V/'       d!   V.PA                  REPC                  V/4      4       R2PE                  V.4      pAVA'       d   RFV(: RGXA: RH2pBRIPC                  VB4      p*MR2p*VP[                  V+V*RJ7       EK'  	  RKV'9   dB   V'RK,           F4  pCVCR9,          p,VCP?                  RLR4      pDVCRM,          VCRN,          VD3V$V,&   K6  	  V$P]                  4        FU  w  p,pCV#VC^,          ,          pEV#VC^ ,          ,          pFVC^,          pGVGe   XEROXG,          ,          pEVP_                  XEXF4       KW  	  V'       do   . pHSNP]                  4        F'  w  pIpJXHPA                  RPPC                  VJVI4      4       K)  	  VP[                  RQRRPC                  R2PE                  XH4      4      RJ7       Vf   Ve   VPa                  WVRS7       VP/                  RTR47      # )Vz
"Pretty" prints the DOT graph of the CFG.
For explanation of the parameters see the docstring for
numba.core.dispatcher::inspect_cfg.
N)binding)List)SimpleNamespace)defaultdictF)increfdecrefreturnsraisesmeminfobranchesllvm_intrin_callsfunction_calls)pythonlineinfoc                \   \        V\        4      '       d"   V P                   F  p\        WV4       K  	  R# \        V\        4      '       du   VP                  4        F^  w  r4W0P                  9  d   \        RV,          4      h\        V\        4      '       d   \        WV4       KK  Rp\        WSV3,          4      h	  R# \        V\        4      '       d:   V F1  pW`P                  9  d   \        RV,          4      h\        WR4       K3  	  R# Rp\        V\        V4      ,          4      h)zParses the kwarg into a consistent format for use in configuring
the Digraph rendering. _config is the configuration instance to
update, kwarg is the kwarg on which to base the updates.
zUnexpected key in kwarg: %sz$Unexpected value for key: %s, got:%sTz)Unhandled configuration type for kwarg %sN)	
isinstancebool__dict__setattrdictitemsr<   settype)_configkwargattrkvrD   r%   s   &&     r   parse_config)_CFG.pretty_printer.<locals>.parse_config   s    
 %&&#,,DG51 -E4((!KKMDA 0 00()F)JKK!!T**A.D(1v66 * E3''!D#3#33()F)MNNt4	 " B tE{!233r   c                      R # )white rv   r   r   <lambda>%_CFG.pretty_printer.<locals>.<lambda>   s    r   orangemarkeryellowrb   greentruebrredfalsebrcyanrZ   	turquoiser[   	lightpinkraiselightseagreenr^   purplereturn	rosybrownr`   tomatora   c                   < / pSP                  R4      pV P                  4        FT  pVP                  V4      pVf   K  VP                  4       pVf   K0  \	        V4      ^8X  g   Q hV^,          W^ ,          &   KV  	  V# )zGets the metadata entries from the LLVM IR, these look something
like '!123 = INFORMATION'. Returns a map of metadata key to metadata
value, i.e. from the example {'!123': INFORMATION}z(^[!][0-9]+)(\s+=\s+.*))compile
splitlinesmatchgroupslen)llvm_strmdmetadata_entryxr   gres   &     r   get_metadata)_CFG.pretty_printer.<locals>.get_metadata   sx     BZZ(BCN((*&,,Q/$A}"1v{*{#$Q4Q4 + Ir   c                   < ^p\        V4      V8  d'   RV R2p\        P                  ! V\        4       VRV pSP	                  WR7      pVP                  RR7       VP                  RRR	\        V4      ,          R
7       V# )   zCFG output filename "z9" exceeds maximum supported length, it will be truncated.N)filenameTB)rankdirnodenonez%s)shapefontsize)r   r!   r"   r   Digraphro   str)rK   fnamer   cmaxwstrfgvs   &&&   r   init_digraph)_CFG.pretty_printer.<locals>.init_digraph   s     D5zD /w 7B Cd$=>et

4
0AFF4F FF6$X2FFGHr   z
.*{(.*)}.*z.*<(.*)>(.*)z.*!dbg\s+(![0-9]+).*z7.*!DILocation\(line:\s+([0-9]+),\s+column:\s+([0-9]),.*z.*call void @llvm.dbg.value.*z@NRT_incref\bz@NRT_decref\bz@NRT_MemInfoz.*call.*@llvm\..*z.*call.*@.*z"store .*\!numba_exception_output.*zret i32 [^1],?.*c                 4    \         P                  ! V ^xRR7      # )x   z... )widthsubsequent_indent)textwrapwrap)ss   &r   r   !_CFG.pretty_printer.<locals>.wrap   s    ==#HHr   c                 \   R p\        V 4      V8  d*   \        \        V 4      4      pRP                  V RV V4      p \        P
                  ! V 4      p V P                  RR4      p V P                  RR4      p V P                  RR4      p V P                  R	R
4      p V P                  RR4      p V # )i,  z{}...<hash={}>Nz\{z&#123;z\}z&#125;\z&#92;%z&#37;!z&#33;)r   r   hashformathtmlescapereplace)r   nhss   &  r   clean"_CFG.pretty_printer.<locals>.clean   s     A1vza\$++AbqE26AA		%*A		%*A		$(A		#w'A		#w'AHr   z\l... dot_json)r   utf-8objectslabelrK   _gvidz\l|z<<td BGCOLOR="{}" BORDER="1" ALIGN="center" PORT="{}">{}</td>TFru   zF<tr><td BGCOLOR="{}" BORDER="1" ALIGN="left" COLSPAN="{}">{}</td></tr>defaultzF<tr><td BGCOLOR="{}" BORDER="0" ALIGN="left" COLSPAN="{}">{}</td></tr>c                  < SP                  V 4      pVEen   VP                  4       pVEeW   \        V4      ^8X  g   Q V4       hV^ ,          pSP                  VR4      pVEe   SP                  V4      pVEe   \        VP                  4       4      ^8X  g   Q V4       hVP                  4       w  rxVS8w  g   VS8w  d   SP                  '       d>   Rp	WWx3,          p
SP                  SR,          SS! V
4      4      pVP                  V4       SP                  '       d[   \        V4      S^,           ,
          pSV^,           ,          pSP                  SR,          SS! V4      4      pVP                  V4       Wx3# R# R# R# R# R# )zo
Search line `l` for metadata associated with python or line info
and inject it into `new_lines` if requested.
NzMarker %s, Line %s, column %srz   rb   )	r   r   r   getrc   r   appendrb   int)l	new_linesmatchedr   rz   
debug_dataldlinecolmfmt	mark_linelnlidxsource_line_interleaver   col_spancscur_colcur_linefirstlinenofmtlocation_entryr   metadata_markersrc_codes   &&            r   metadata_interleave0_CFG.pretty_printer.<locals>.metadata_interleavei  sz   
 *//2&(A}"1v{-A-{!"1%'VVFD%9
%1 "0!5!5j!AB!~'*299;'71'< @b @'<,.IIK	 $(8#3sg~'2';';';/N48D;N4N	-0ZZ8h8=i8H.J(1(8(8(<'2'9'9'9 034yK!O/L6>tax6H-0ZZ8h8=k8J.L(1(8(8(<+/9$4% 8F  .	 2	 % 'r   :   NNz<tr>{}</tr>z<table id="z<" BORDER="1" CELLBORDER="0" CELLPADDING="0" CELLSPACING="0">z</table>z<{}>)r   edgestailportheadtailz:%sz;<tr><td BGCOLOR="{}" BORDER="0" ALIGN="center">{}</td></tr>Keyzn<<table BORDER="1" CELLBORDER="1" CELLPADDING="2" CELLSPACING="1"><tr><td BORDER="0">Key:</td></tr>{}</table>>)r   viewr   svg)1graphvizr   jsoninspectllvmliterV   numba.typedrW   typesrX   collectionsrY   rJ   rM   rK   get_llvm_strr   rb   getsourcelinesrL   rN   r   Sourcepipeloadsdecoder   r   r   r   r_   r   r   r   joinr   rc   rZ   searchr[   r^   r]   r\   r`   ra   r   rj   edgerender)YrQ   r   r   render_formatr(   
interleavestrip_irshow_keyr   r   r   r   rW   rX   rY   _default
_highlightrr   rR   r   r   r   r   
port_matchport_jmp_matchlocation_expr	dbg_value
nrt_incref
nrt_decrefnrt_meminfoll_intrin_callsll_function_callll_raise	ll_returnr   node_idsedge_idsraw_dot
json_bytesjzonidcobjr   rK   gvidlinesr   	port_liner   sliced_linesportsports_tokenstdfmttbl_datacolorstoktargetvaluecolor	fmtheaderr   r   updated_lineinfocolourr   dattabr   tpr   r   portkey_tabrp   rq   r   r   r   r   r   r   r   r   r   r   r   r   r   r   sY   &&&&&&&&&                                                                  @@@@@@@@@@@@@@r   pretty_printer_CFG.pretty_printerc   s    	*$)+$H+3,4+3,4-56>3;>
 &XI	46 	Z+[*- )88898"8!7'98"-' YY##DII.99))+	 (#	$ DIIx8 ZZ-
N3**%<=4M2JJ?@	ZZ 01
ZZ 01
jj0**%9:::n5::CDJJ12		I
	,  $+$:$:4<<$H!Hk
 %%b)11(B?YYw',,J,?
zz*++G45	??C !#BHgLEv;Dw<D!HTN !BKEKK&E I, H I &&uRy1G L"(+${{3/|,-&&&!2h<bmDFF'C$2$8$8$=$D$D$FMFE"JJug6EOOELL$FG ( GGH-	  %Sbz5IY--bmX.3LO4I4I4K.LN O/C)5 )5 )5V ""%% ??1%% ''';+=+=+=':1i'H$'3,<)' $$$):):1)=)=\F&&&:+<+<Q+?+?\F'''K,>,>q,A,A	]F&&&8??1+=+=[F'''I,<,<Q,?,?\F111o6L6LQ6O6O 34F...3C3J3J13M3M 01F	]F
 I.hh!%(^!((FHa)HI ,K &T   !5!5i!@A '')$CsHKHKM c* FF4uF%c #h d?WG}XXj$/"&v,Vb!A & #..*JD$DG$DDG$D7D$FF4 + G
1 !0171? # FF5 "0178H1I  K
 4#3HHh-HH vvUv##r   c           	     h    V P                   ! RRVRVRV/V P                  B pVP                  R4      # )ac  
Plot the CFG.  In IPython notebook, the return image object can be
inlined.

The *filename* option can be set to a specific path for the rendered
output to write to.  If *view* option is True, the plot is opened by
the system default application for the image format (PDF). *format* can
be any valid format string accepted by graphviz, default is 'pdf'.
r   r   r   r   rv   r+  rP   r   )rQ   r   r   r   rawbyts   &&&& r   display_CFG.display  sJ     $$ Jh JT J39J=A[[J}}W%%r   c                X    V P                   ! R/ V P                  B P                  R 4      # )r   rv   r.  rQ   s   &r   
_repr_svg__CFG._repr_svg_  s%    ""1T[[188AAr   c                    V P                   # rI   )rO   r3  s   &r   __repr___CFG.__repr__  s    xxr   )rJ   rO   rP   rK   rL   )NNNTFFT
   )NpdfF)__name__
__module____qualname____firstlineno____doc__rS   r+  r0  r4  r7  __static_attributes____classdictcell____classdict__s   @r   rG   rG   S   s+     L$\&B r   rG   c                     a  ] tR tRt o RtRtRtRtV 3R lR lt]	R 4       t
]	R 4       t]	R 4       t]	R	 4       tR
 tR tR tR t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       tR tR tR tRtV tR# )CodeLibraryi  z
An interface for bundling LLVM code together and compiling it.
It is tied to a *codegen* instance (e.g. JITCPUCodegen) that will
determine how the LLVM code is transformed and linked together.
Fc                $   < V ^8  d   QhRRRS[ /# )   codegen
CPUCodegenrK   )r   )r   rC  s   "r   __annotate__CodeLibrary.__annotate__  s     " " "C "r   c                    Wn         W n        V P                  P                   R V P                  : R2p\	        V4      V n        . V n        \        4       V n        R# )()N)	_codegen_name	__class__r;  r   _recorded_timings_dynamic_globalsrk   _reload_init)rQ   rH  rK   ptc_names   &&& r   rS   CodeLibrary.__init__  sL    
nn--.a

~Q?!6x!@ "Er   c                R    V P                  4        \        V P                  4      ^ 8  # )r   )_ensure_finalizedr   rS  r3  s   &r   has_dynamic_globalsCodeLibrary.has_dynamic_globals  s$     4(()A--r   c                    V P                   # rI   )rR  r3  s   &r   recorded_timingsCodeLibrary.recorded_timings   s    %%%r   c                    V P                   # )z)
The codegen object owning this library.
)rO  r3  s   &r   rH  CodeLibrary.codegen$  s    
 }}r   c                    V P                   # rI   )rP  r3  s   &r   rK   CodeLibrary.name+  s    zzr   c                >    R V P                   \        V 4      3,          # )z<Library %r at 0x%x>)rK   idr3  s   &r   r7  CodeLibrary.__repr__/  s    %BtH(===r   c                H    V P                   '       d   \        R V : 24      hR# )z)operation impossible on finalized object N)
_finalizedRuntimeErrorr3  s   &r   _raise_if_finalizedCodeLibrary._raise_if_finalized2  s%    ???"& ) * * r   c                N    V P                   '       g   V P                  4        R # R # rI   )rf  finalizer3  s   &r   rX  CodeLibrary._ensure_finalized7  s    MMO r   c                \    V P                  4        V P                  P                  V4      pV# )z3
Create an LLVM IR module for use by this library.
)rh  rO  _create_empty_modulerQ   rK   	ir_modules   && r   create_ir_moduleCodeLibrary.create_ir_module;  s*     	  "MM66t<	r   c                    R# )zS
Add a library for linking into this library, without losing
the original library.
Nrv   rQ   librarys   &&r   add_linking_libraryCodeLibrary.add_linking_libraryC      r   c                    R# )z3
Add an LLVM IR module's contents to this library.
Nrv   )rQ   rp  s   &&r   add_ir_moduleCodeLibrary.add_ir_moduleJ  rx  r   c                    R# )z
Finalize the library.  After this call, nothing can be added anymore.
Finalization involves various stages of code optimization and
linking.
Nrv   r3  s   &r   rk  CodeLibrary.finalizeP  rx  r   c                    R# )z%
Return the function named ``name``.
Nrv   rQ   rK   s   &&r   rM   CodeLibrary.get_functionX  rx  r   c                    R# )z1
Get the human-readable form of the LLVM module.
Nrv   r3  s   &r   r   CodeLibrary.get_llvm_str^  rx  r   c                    R# )z"
Get the human-readable assembly.
Nrv   r3  s   &r   get_asm_strCodeLibrary.get_asm_strd  rx  r   c                0    R V n         RV n        RV n        R# )TNF)_object_caching_enabled_compiled_object	_compiledr3  s   &r   enable_object_caching!CodeLibrary.enable_object_cachingn  s    '+$ $r   c                    V P                   '       g   \        R V : 24      hV P                  f   \        RV : 24      hV P                  # )object caching not enabled in zno compiled object yet for )r  r<   r  rg  r3  s   &r   _get_compiled_object CodeLibrary._get_compiled_objects  sB    +++4IJJ  ($HII$$$r   c                    V P                   '       g   \        R V : 24      hV P                  '       d   \        RV : 24      hWn        RV n        R# )r  zlibrary already compiled: TN)r  r<   r  r  _disable_inspection)rQ   r!  s   &&r   _set_compiled_object CodeLibrary._set_compiled_objectz  sA    +++4IJJ>>>tEFF %#' r   )	rO  r  r  r  rS  rP  r  rR  rT  N)r;  r<  r=  r>  r?  rf  r  r  rS   propertyrY  r\  rH  rK   r7  rh  rX  rq  r   rv  rz  rk  rM   r   r  r  r  r  r@  rA  rB  s   @r   rE  rE    s     J#" " . . & &    >*
    
    
  
  
%( (r   rE  )	metaclassc                      a a ] tR tRt oV 3R ltR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tRR ltR t]R 4       t]R 4       t]R 4       tR tR t]R 4       tRtVtV ;t# )CPUCodeLibraryi  c                .  < \         SV `  W4       . V n        \        P                  ! \        V P                  P                  V P                  4      4      4      V n	        \        P                  ! V P                  4      V P                  n        R V n        R # rI   )superrS   _linking_librariesr   parse_assemblyr   rO  rn  rK   _final_moduler   normalize_ir_text_shared_module)rQ   rH  rK   rQ  s   &&&r   rS   CPUCodeLibrary.__init__  sl    '"$..22499=>@")";";DII"F"r   c                \   V P                   P                  Vn        VP                   Fl  pV P                   P	                  4       w  r4RVP
                  : 2pV P                  P                  WT4      ;_uu_ 4        VP                  W$4       RRR4       Kn  	  R#   + '       g   i     K  ; i)z@
Internal: run function-level optimizations inside *ll_module*.
zFunction passes on N)	rO  _data_layoutdata_layout	functions_function_pass_managerrK   rR  recordrun)rQ   	ll_modulefuncfpmpbrp   s   &&    r   _optimize_functions"CPUCodeLibrary._optimize_functions  s    
 !% : :	''D mm::<GC%dii]3A''..q55! 65 (
 655s   :BB+c                   V P                   P                  V P                   P                  RV P                   P                  RR7      w  rV P                   P                  4       w  r4RpV P                  P                  WR4      ;_uu_ 4        VP                  V P                  V4       RRR4       \        P                  '       g   \        V P                  4      V n        RpV P                  P                  Wd4      ;_uu_ 4        VP                  V P                  V4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)z1
Internal: optimize this library's final module.
Fcheap)loop_vectorizeslp_vectorizeoptcostz/Module passes (cheap optimization for refprune)Nz!Module passes (full optimization))rO  _module_pass_manager	_loopvect
_opt_levelrR  r  r  r  r   LLVM_REFPRUNE_PASSr	   )rQ   	mpm_cheap	mpb_cheapmpm_fullmpb_full
cheap_name	full_names   &      r   _optimize_final_module%CPUCodeLibrary._optimize_final_module  s    !% B B:>--:Q:Q9>/3}}/G/G07	 !C !9	 "]]??AF
##**:AA MM$,,i8 B
 (((!;D<N<N!OD7	##**9??LL++X6 @? BA @??s   D,D?,D<	?E	c                   V P                  4        V P                  e   V P                  # V P                  p. p^ pVP                   Ff  pV^,          pVP                  '       d   K   VP
                  \        P                  P                  8X  g   KK  VP                  VP                  4       Kh  	  V^ 8X  d   \        RV : 24      hV'       d0   VP                  4       pV F  pRVP                  V4      n        K  	  Wn        V# )a
  
Internal: get a LLVM module suitable for linking multiple times
into another library.  Exported functions are made "linkonce_odr"
to allow for multiple definitions, inlining, and removal of
unused exports.

See discussion in https://github.com/numba/numba/pull/890
z5library unfit for linking: no available functions in linkonce_odr)rX  r  r  r  is_declarationlinkager   Linkageexternalr   rK   rg  clonerM   )rQ   modto_fixnfuncsrR   rK   s   &     r   _get_module_for_linking&CPUCodeLibrary._get_module_for_linking  s     	 *&&&  --BaKF$$$rzz7J7J)Jbgg&   Q; "& ) * * ))+C 2@  &.  "
r   c                \    VP                  4        V P                  P                  V4       R # rI   )rX  r  r   rt  s   &&r   rv  "CPUCodeLibrary.add_linking_library  s"    !!#&&w/r   c                8   V P                  4        \        V\        P                  4      '       g   Q h\        P
                  ! \        V4      4      p\        P                  ! V4      pVP                  Vn	        VP                  4        V P                  V4       R # rI   )rh  re   llvmirModuler   r  r   r   r  rK   verifyadd_llvm_module)rQ   rp  irr  s   &&  r   rz  CPUCodeLibrary.add_ir_module  sn      ")V]]3333&&s9~6%%b)	"	Y'r   c                    V P                  V4       \        P                  '       g   \        V4      pV P                  P                  V4       R # rI   )r  r   r  r	   r  link_in)rQ   r  s   &&r   r  CPUCodeLibrary.add_llvm_module  s:      +(((29=I""9-r   c                r   \        4        V P                  P                  4        V P                  4        \        P
                  '       d-   \        R V P                  ,          V P                  4       R4       \        4       pV P                   Fl  pW!9  g   K  V P                  P                  VP                  4       VP                  V4       V P                  P                  VP!                  4       RR7       Kn  	  V P#                  4        V P                  P%                  4        V P'                  4        R# )zFUNCTION OPTIMIZED DUMP %sr-   T)preserveN)r   rO  _check_llvm_bugsrh  r   DUMP_FUNC_OPTrE   rK   r   rk   r  rT  updateaddr  r  r  r  r  _finalize_final_module)rQ   seenru  s   &  r   rk  CPUCodeLibrary.finalize  s    $& 	&&(  "-		9""$f. u..G"!!(()=)=>!""**335 +  / 	##%!!###%r   c                    V P                   P                   FK  pVP                  P                  R 4      '       g   K&  V P                  P                  VP                  4       KM  	  R# )znumba.dynamic.globalsN)r  global_variablesrK   
startswithrS  r   )rQ   r   s   & r   _finalize_dynamic_globals(CPUCodeLibrary._finalize_dynamic_globals
  sF    $$55Bww!!"9::%%,,RWW5 6r   c                    V P                   P                   F^  pVP                  '       g   K  VP                  P	                  R 4      '       g   K:  Rp\        VP                  VP                  4      4      h	  R# )	_ZN5numbazSymbol {} not linked properlyN)r  r  r  rK   r  AssertionErrorr   )rQ   rR   rD   s   &  r   _verify_declare_only_symbols+CPUCodeLibrary._verify_declare_only_symbols  sU    $$..B   RWW%7%7%D%D5$SZZ%899	 /r   c                P   V P                  4        V P                  4        \        P                  ! V 4      V P                  n        V P                  P                  V P                  4      pV'       d   \        P                  ! W4       V P                  4        RV n
        \        P                  '       d-   \        RV P                  ,          V P                  4       R4       \        P                   '       d/   \        RV P                  ,          V P#                  4       R4       R# R# )z/
Make the underlying LLVM module ready to use.
TzOPTIMIZED DUMP %sr-   zASSEMBLY %sr.   N)r  r  weakrefproxyr  _CPUCodeLibrary__libraryrO  _add_modulerk  _finalize_specificrf  r   DUMP_OPTIMIZEDrE   rK   r   DUMP_ASSEMBLYr  )rQ   cleanups   & r   r  %CPUCodeLibrary._finalize_final_module  s     	&&())+ (/}}T':$
 --++D,>,>?T+!   $tyy0$2C2C2EvN*D,<,<,>F  r   c              #  |   "   V P                   pVP                   F  pVP                  '       d   K  Vx  K  	  R# 5i)zR
Get all functions defined in the library.  The library must have
been finalized.
N)r  r  r  )rQ   r  rR   s   &  r   get_defined_functions$CPUCodeLibrary.get_defined_functions2  s1     
   --B$$$  s   +<
<c                8    V P                   P                  V4      # rI   )r  rM   r  s   &&r   rM   CPUCodeLibrary.get_function<  s    !!..t44r   c                Z    V P                   '       d   \        P                  ! R 4       R# R# )z@Inspection disabled for cached code. Invalid result is returned.N)r  r!   r"   r3  s   &r    _sentry_cache_disable_inspection/CPUCodeLibrary._sentry_cache_disable_inspection?  s$    ###MM 8 9 $r   c                L    V P                  4        \        V P                  4      # rI   )r  r   r  r3  s   &r   r   CPUCodeLibrary.get_llvm_strD  s    --/4%%&&r   c                    V P                  4        \        V P                  P                  P	                  V P
                  4      4      # rI   )r  r   rO  _tmemit_assemblyr  r3  s   &r   r  CPUCodeLibrary.get_asm_strH  s4    --/4==$$2243E3EFGGr   c                <    V P                  4        \        WV3/ VB # )z-
Get control-flow graph of the LLVM function
)r  rG   )rQ   rK   rL   rP   s   &&&,r   rN   CPUCodeLibrary.get_function_cfgL  s"     	--/D2622r   c                8    V P                  4       p\        W!4      # )a)  
Get the CFG of the disassembly of the ELF object at symbol mangled_name.

Requires python package: r2pipe
Requires radare2 binary on $PATH.
Notebook rendering requires python package: graphviz
Optionally requires a compiler toolchain (via pycc) to link the ELF to
get better disassembly results.
)r  r   )rQ   mangled_nameelfs   && r   get_disasm_cfgCPUCodeLibrary.get_disasm_cfgS  s     '')%c88r   c                4   ^ RI Hp ^ RIHp ^ RIHp V! V! V4      4      p\        R4       VP                  4        F  pVR,          R8X  g   K  \        VP                  4       R R7      p\        R	4       V F  pVP                  '       g   K  \        R
VP                  P                  4       VR,          VR,          VP                  VR,          R,          4      VP                  VR,          R,          4      3,          4       K  	  K  	  \        4        R# )z_
Dump the symbol table of an ELF file.
Needs pyelftools (https://github.com/eliben/pyelftools)
)ELFFile)descriptions)BytesIOz	ELF file:sh_type
SHT_SYMTABc                     V P                   # rI   rK   )syms   &r   rw   *CPUCodeLibrary._dump_elf.<locals>.<lambda>m  s    SXXr   )keyz    symbols:z/    - %r: size=%d, value=0x%x, type=%s, bind=%sst_sizest_valuest_inforl   bindN)elftools.elf.elffiler
  elftools.elfr  ior  r1   iter_sectionssortediter_symbolsrK   r   describe_symbol_typedescribe_symbol_bind)	clsbufr
  r  r  r   secsymbolsr  s	   &&       r   	_dump_elfCPUCodeLibrary._dump_elf`  s     	1-GCL!k??$C9~- !1!1!39MNn%"C888 K XX__. ^ _)>>s9~f?UV)>>s9~f?UV	   #	 % 	r   c                     VP                   pTP                  '       d   RTn        Y#n        R# R#   \         d     R# i ; i)z2
`ll_module` was compiled into object code `buf`.
NT)r  r    r  r  r  )r   r  r!  rQ   s   &&& r   _object_compiled_hook$CPUCodeLibrary._object_compiled_hook{  sF    
	&&D '''!DN$'! (  		s   1 A A c                     VP                   pTP                  '       d*   TP                  '       d   TP                  pRTn        T# R# R#   \         d     R# i ; i)z.
Return a cached object code for `ll_module`.
N)r  r    r  r  )r   r  rQ   r!  s   &&  r   _object_getbuffer_hook%CPUCodeLibrary._object_getbuffer_hook  s`    
	&&D '''D,A,A,A''C$(D!J -B'  		s   A AAc                p    V P                  4        V P                  RV P                  P                  4       3# )zH
Serialize this library using its bitcode as the cached representation.
bitcode)rX  rK   r  
as_bitcoder3  s   &r   serialize_using_bitcode&CPUCodeLibrary.serialize_using_bitcode  s0     	 		9d&8&8&C&C&EFFr   c                    V P                  4        V P                  4       V P                  4       P                  4       3pV P                  RV3# )z
Serialize this library using its object code as the cached
representation.  We also include its bitcode for further inlining
with other libraries.
object)rX  r  r  r.  rK   )rQ   datas   & r   serialize_using_object_code*CPUCodeLibrary.serialize_using_object_code  sI     	 ))+,,.99;=		8T**r   c                   Vw  r4pVP                  V4      p\        W`4      '       g   Q hVR 8X  d.   \        P                  ! V4      Vn        VP                  4        V# VR8X  d   Vw  rxVP                  4        VP                  V4       \        P                  ! V4      Vn        VP                  4        VP                  P                  P                  VP                  4       V# \        RV: 24      h)r-  r2  zunsupported serialization kind )create_libraryre   r   parse_bitcoder  r  r  r  r  rO  _engine_load_defined_symbolsr<   )	r   rH  staterK   kindr3  rQ   object_codeshared_bitcodes	   &&&      r   _unserializeCPUCodeLibrary._unserialize  s     D%%d+$$$$$9!#!1!1$!7D'')KX*.'K&&(%%k2"$"2"2>"BD'')MM!!778K8KLKDJKKr   )r  r  r  rf  r  r  rI   ) r;  r<  r=  r>  rS   r  r  r  rv  rz  r  rk  r  r  r  r  rM   r  r   r  rN   r  classmethodr$  r'  r*  r/  r4  r?  r@  rA  __classcell__)rQ  rC  s   @@r   r  r    s     #"74!F0(.&<6:G459
'H39  4 
( 
(  G	+ L L Lr   r  c                   2   a  ] tR tRt o R tR tR tRtV tR# )AOTCodeLibraryi  c                    V P                  4        V P                  P                  P                  V P                  4      # )z
Return this library as a native object (a bytestring) -- for example
ELF under Linux.

This function implicitly calls .finalize().
)rX  rO  r  emit_objectr  r3  s   &r   emit_native_object!AOTCodeLibrary.emit_native_object  s1     	 }}  ,,T-?-?@@r   c                V    V P                  4        V P                  P                  4       # )zb
Return this library as LLVM bitcode (a bytestring).

This function implicitly calls .finalize().
)rX  r  r.  r3  s   &r   emit_bitcodeAOTCodeLibrary.emit_bitcode  s%     	 !!,,..r   c                    R # rI   rv   r3  s   &r   r  !AOTCodeLibrary._finalize_specific      r   rv   N)	r;  r<  r=  r>  rG  rJ  r  r@  rA  rB  s   @r   rD  rD    s     A/ r   rD  c                   ,   a  ] tR tRt o R tR tRtV tR# )JITCodeLibraryi  c                    V P                  4        V P                  P                  pVP                  V4      '       g   ^ # V P                  P                  P	                  V4      # )a8  
Generate native code for function named *name* and return a pointer
to the start of the function (as an integer).

This function implicitly calls .finalize().

Returns
-------
pointer : int
    - zero (null) if no symbol of *name* is defined by this code
      library.
    - non-zero if the symbol is defined.
)rX  rO  r9  is_symbol_definedget_function_address)rQ   rK   ees   && r   get_pointer_to_function&JITCodeLibrary.get_pointer_to_function  sN     	 ]]""##D))==((==dCCr   c                   V P                   P                  V P                  4       V P                  P	                  R 4      ;_uu_ 4        V P                   P
                  P                  4        RRR4       R#   + '       g   i     R# ; i)zFinalize objectN)rO  _scan_and_fix_unresolved_refsr  rR  record_legacyr9  finalize_objectr3  s   &r   r  !JITCodeLibrary._finalize_specific  sX    33D4F4FG##112CDDMM!!113 EDDDs   	%A88B		rv   N)r;  r<  r=  r>  rU  r  r@  rA  rB  s   @r   rP  rP    s     D*4 4r   rP  c                   @   a  ] tR tRt o RtRtR tR tR tR t	Rt
V tR	# )
RuntimeLinkeri  zH
For tracking unresolved symbols generated at runtime due to recursion.
z.numba.unresolved$c                f    \         P                  ! 4       V n        \        4       V n        . V n        R # rI   )r   
UniqueDict_unresolvedrk   _defined	_resolvedr3  s   &r   rS   RuntimeLinker.__init__  s#     ++-r   c                   V P                   pVP                   F  pVP                  P                  V4      '       g   K&  VP                  \	        V4      R pVP                  VP                  4      '       d   Ka  \        P                  P                  R4      p\        P                  ! V4      pVP                  V\        P                  ! V4      4       WpP                  V&   K  	  R# )zZ
Scan and track all unresolved external symbols in the module and
allocate memory for it.
Nnrt_unresolved_abort)PREFIXr  rK   r  r   rR  r
   ru  rU  ctypesc_void_padd_global_mapping	addressofr`  )rQ   moduleengineprefixr   r  abortfnptrs   &&&     r   scan_unresolved_symbols%RuntimeLinker.scan_unresolved_symbols   s    
 ))Bww!!&))ggc&kl+++BGG44--??@VWoog.))"f.>.>s.CD(+  % *r   c                    VP                    F<  pVP                  '       d   K  V P                  P                  VP                  4       K>  	  R# )z%
Scan and track all defined symbols.
N)r  r  ra  r  rK   )rQ   rk  rR   s   && r   scan_defined_symbols"RuntimeLinker.scan_defined_symbols  s6     ""B$$$!!"''* #r   c                "   V P                    Uu. uF  q"V P                  9   g   K  VNK  	  ppV FV  pVP                  V4      pV P                   V,          pWEn        V P                  P                  W%34       V P                   V KX  	  R# u upi )z-
Fix unresolved symbols if they are defined.
N)r`  ra  rS  r!  rb  r   )rQ   rl  rK   pendingfnptrro  s   &&    r   resolveRuntimeLinker.resolve  s    
 %)$4$4N$4D8M44$4ND//5E""4(CINN!!4+.  &  Os
   BB)ra  rb  r`  N)r;  r<  r=  r>  r?  rf  rS   rp  rs  rx  r@  rA  rB  s   @r   r]  r]    s*      "F
,&+' 'r   r]  c                 F   a  \         P                  ! S 4      V 3R  l4       pV# )c                 0   < S! V P                   .VO5/ VB # rI   )_ee)rQ   argsrP   olds   &*,r   wrapper_proxy.<locals>.wrapper-  s    488-d-f--r   )	functoolswraps)r~  r  s   f r   _proxyr  ,  s#    __S. .Nr   c                   "  a  ] tR tRt o RtR tR tR tR tR t	]
! ]P                  P                  4      t]
! ]P                  P                  4      t]
! ]P                  P                  4      t]
! ]P                  P                   4      tRtV tR	# )
	JitEnginei3  zWraps an ExecutionEngine to provide custom symbol tracking.
Since the symbol tracking is incomplete  (doesn't consider
loaded code object), we are not putting it in llvmlite.
c                0    Wn         \        4       V n        R # rI   )r|  rk   _defined_symbols)rQ   rT  s   &&r   rS   JitEngine.__init__8  s     !$r   c                    WP                   9   # )z/Is the symbol defined in this session?
        )r  r  s   &&r   rR  JitEngine.is_symbol_definedE  s     ,,,,r   c                    VP                   VP                  3 FJ  pT ;P                  V Uu0 uF#  pVP                  '       d   K  VP                  kK%  	  up,          un        KL  	  R# u upi )z(Extract symbols from the module
        N)r  r  r  r  rK   )rQ   r  gsetsr   s   &&  r   r:  JitEngine._load_defined_symbolsJ  s^     mmS%9%9:E!! &@"-/->-> '.bgg &@ @! ;&@s   A)
A)
c                Z    V P                  V4       V P                  P                  V4      # )zHOverride ExecutionEngine.add_module
to keep info about defined symbols.
)r:  r|  
add_modulerQ   rk  s   &&r   r  JitEngine.add_moduleQ  s'     	""6*xx""6**r   c                    V P                   P                  VP                  4       V P                  P	                  W4      # )zPOverride ExecutionEngine.add_global_mapping
to keep info about defined symbols.
)r  r  rK   r|  ri  )rQ   r   addrs   &&&r   ri  JitEngine.add_global_mappingX  s1     	!!"''*xx**244r   )r  r|  N)r;  r<  r=  r>  r?  rS   rR  r:  r  ri  r  r   ExecutionEngineset_object_cacherZ  rS  get_global_value_addressr@  rA  rB  s   @r   r  r  3  s     &-
@+5 b00AABR//??@O!""4"4"I"IJ%
33 
r   r  c                   `   a  ] tR tRt o Rt]R 4       t]R 4       t]R 4       t	R t
R tRtV tR	# )
Codegenij  a5  
Base Codegen class. It is expected that subclasses set the class attribute
``_library_class``, indicating the CodeLibrary class for the target.

Subclasses should also initialize:

``self._data_layout``: the data layout for the target.
``self._target_data``: the binding layer ``TargetData`` for the target.
c                    R# )z4
Create a new empty module suitable for the target.
Nrv   r  s   &&r   rn  Codegen._create_empty_moduleu  rx  r   c                    R# )z]
Add a module to the execution engine. Ownership of the module is
transferred to the engine.
Nrv   r  s   &&r   r  Codegen._add_module{  rx  r   c                    V P                   # )z:
The LLVM "target data" object for this codegen instance.
)_target_datar3  s   &r   target_dataCodegen.target_data  s    
    r   c                (    V P                   ! W3/ VB # )zJ
Create a :class:`CodeLibrary` object for use with this codegen
instance.
)_library_class)rQ   rK   rP   s   &&,r   r7  Codegen.create_library  s    
 ""4888r   c                8    V P                   P                  W4      # rI   )r  r?  )rQ   
serializeds   &&r   unserialize_libraryCodegen.unserialize_library  s    ""//AAr   rv   N)r;  r<  r=  r>  r?  r   rn  r  r  r  r7  r  r@  rA  rB  s   @r   r  r  j  sW       
   ! !9B Br   r  c                   h   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tR tRtV tR# )rI  i  c                   \        4        R V n        \        P                  ! \	        V P                  V4      4      4      V n        RV P                  n        \        4       V n	        V P                  V P                  4       R # )Nglobal_codegen_module)initialize_llvmr  r   r  r   rn  _llvm_modulerK   r]  	_rtlinker_init)rQ   module_names   &&r   rS   CPUCodegen.__init__  s_     --))+679!8&

4$$%r   c                p   \        VP                  4      . 8X  g   Q R 4       h\        P                  P	                  \        P
                  ! 4       4      p\        \        P                  R7      pV P                  4       V n
        V P                  V4       VP                  ! R/ VB p\        P                  p\        P                  ! WVR7      p\        P                  '       d   VP!                  4        W@n        \%        V4      V n        VP(                  V n        \-        V P*                  4      V n        \        P                  P0                  '       d   RV n        ^V n        MRV n        ^ V n        V P&                  P7                  V P8                  P:                  V P8                  P<                  4       R# )zModule isn't empty)r  )use_lmmTFNrv   )listr  r   Targetfrom_tripleget_process_tripleri   r   OPT_customize_tm_features_tm_features_customize_tm_optionscreate_target_machineUSE_LLVMLITE_MEMORY_MANAGERcreate_mcjit_compilerENABLE_PROFILINGenable_jit_eventsr  r  r9  r  r  r   r  
is_opt_maxr  r  r  r  r'  r*  )rQ   llvm_moduler   
tm_optionstmr  rl  s   &&     r   r  CPUCodegen._init  sE   K001R7M9MM7&&r'<'<'>?fjj)
 779"":.))7J744))+7K"""$$& (".. 1 12::    "DNDO #DNDO%%d&9&9&O&O&*&9&9&P&P	Rr   c                    \         P                  ! \        P                  ! V4      4      p\        P
                  ! 4       Vn        V P                  '       d   V P                  Vn        V# rI   )	r  r  r   r  r   r  r   r  r  ro  s   && r   rn  CPUCodegen._create_empty_module  sL    MM'";";D"AB	002	$($5$5I!r   c                n   VP                  R R4      pV P                  ! R/ VB pVP                  4       pVeM   VR8X  dF   \        P                  ^ 8w  d1   VP                  4        VP                  4        VP                  4        \        P                  '       d   VP                  \        4       4       WC3# )r  Nr  rv   )pop_pass_buildergetModulePassManagerr   r  add_loop_rotate_passadd_instruction_combine_passadd_jump_threading_passr  add_refprune_passr&   )rQ   rP   r  r  pms   &,   r   r  CPUCodegen._module_pass_manager  s    zz&$')&)$$& FJJ!O ##%++-&&($$$ 5 78vr   c                    V P                   ! R/ VB pVP                  4       p\        P                  '       d   VP	                  \        4       4       W23# )Nrv   )r  getFunctionPassManagerr   r  r  r&   )rQ   rP   r  r  s   &,  r   r  !CPUCodegen._function_pass_manager  sH    )&)&&($$$  !6!89vr   c           	         VP                  R \        P                  4      pVP                  R\        P                  4      pVP                  R\        P                  4      p\        V P                  3R VRVRV/VB pV# )r  r  r  )r  r   r  LOOP_VECTORIZESLP_VECTORIZEr   r  )rQ   rP   	opt_levelr  r  r  s   &,    r   r  CPUCodegen._pass_builder  s{    JJufjj1	$4f6K6KL

?F4H4HI  +y +0>+/<+ $*+
 	r   c                    Rp\         P                  ! V4      p\        V4      pRV9   g   RV9   d   R# RV9   d&   \        P                  ! 4       p\        RV: R24      h\        RV: R	24      h)
z,
Guard against some well-known LLVM bug(s).
zo
            define double @func()
            {
                ret double 1.23e+01
            }
            z12.3z1.23Nz1.0zFLLVM will produce incorrect floating-point code in the current locale zh.
Please read https://numba.readthedocs.io/en/stable/user/faq.html#llvm-locale-bug for more information.zUnexpected IR:

)r   r  r   locale	getlocalerg  r  )rQ   r  r  ir_outlocs   &    r   r  CPUCodegen._check_llvm_bugs  sr     #SVv/F?""$C
 	  v?@@r   c                d    V P                   P                  V P                  4       V P                  3# )z@
Return a tuple unambiguously describing the codegen behaviour.
)r  r   _get_host_cpu_namer  r3  s   &r   magic_tupleCPUCodegen.magic_tuple  s1     !!(($*A*A*C!!# 	#r   c                    V P                   P                  WP                  4       V P                   P                  V4       V P                   P	                  V P                  4       R # rI   )r  rp  r9  rs  rx  r  s   &&r   rX  (CPUCodegen._scan_and_fix_unresolved_refs  s@    ..v||D++F3t||,r   c                ~   \         P                  ! ^4      P                  4       pV P                  P                  V,           pVP
                  p VP                  V4      pVP                  VP                  V4      VP                  4       4      #   \         d#    \         P                  ! YdTR7      pRTn	         L[i ; i)   r  r  )r  IntType
as_pointerr  rf  rk  
get_globalKeyErrorGlobalVariabler  bitcastload)rQ   builderfntyrK   voidptrptrnamellvm_modrw  s   &&&&    r   insert_unresolved_ref CPUCodegen.insert_unresolved_ref  s    ..#..0..''$.>>	'''0E
 w||E2DOO4EFF	  	'))('JE&EM	's   B *B<;B<c                p    \         P                  f   \        P                  ! 4       # \         P                  # rI   )r   CPU_NAMEr   get_host_cpu_namer3  s   &r   r  CPUCodegen._get_host_cpu_name*  s+    ??* $$& 	&__	&r   c                Z    \         P                  e   \         P                  # \        4       # rI   )r   CPU_FEATURESget_host_cpu_featuresr3  s   &r   _get_host_cpu_features!CPUCodegen._get_host_cpu_features/  s#    *&&&$&&r   )	r  r9  r  r  r  r  r  r  r  N)r;  r<  r=  r>  rS   r  rn  r  r  r  r  r  rX  r  r  r  r@  rA  rB  s   @r   rI  rI    sJ     &&RP$
A<#-

G&
' 'r   rI  c                   D   a  ] tR tRt o Rt]tR	R ltR tR t	R t
RtV tR# )
AOTCPUCodegeni5  zd
A codegen implementation suitable for Ahead-Of-Time compilation
(e.g. generation of object files).
Nc                R    T;'       g    R V n         \        P                  W4       R# )r   N)	_cpu_namerI  rS   )rQ   r  cpu_names   &&&r   rS   AOTCPUCodegen.__init__=  s    !RD.r   c                    V P                   pVR 8X  d   V P                  4       pW!R&   RVR&   RVR&   V P                  VR&   R# )hostcpupicrelocr   	codemodelfeaturesN)r  r  r  )rQ   optionsr  s   && r   r  #AOTCPUCodegen._customize_tm_optionsB  sL    >>v..0H! ("//
r   c                    R # )r   rv   r3  s   &r   r  $AOTCPUCodegen._customize_tm_featuresK  s     r   c                    R # rI   rv   r  s   &&r   r  AOTCPUCodegen._add_moduleP  rN  r   )r  rI   )r;  r<  r=  r>  r?  rD  r  rS   r  r  r  r@  rA  rB  s   @r   r  r  5  s*     
 $N/
0
 r   r  c                   @   a  ] tR tRt o Rt]tR tR tR t	R t
RtV tR# )	JITCPUCodegeniT  zA
A codegen implementation suitable for Just-In-Time compilation.
c                   V P                  4       VR &   \        P                  P                  4       P                  pVP                  R4      '       d   RpMVP                  R4      '       d   RpMRpW1R&   RVR&   V P                  VR	&   \        P                  ! \        P                  P                  4      pR
VP                  9   d   RVR
&   R# R# )r  x86staticppcr	  r   r
  
jitdefaultr  r  jitTN)r  r   r  from_default_triplerK   r  r  r   pysignaturer  
parameters)rQ   r  r   reloc_modelsigs   &&   r   r  #JITCPUCodegen._customize_tm_options[  s     002 yy,,.33??5!!"K__U##K#K&+ #//
 		 ? ?@CNN"!GEN #r   c                "    V P                  4       # rI   )r  r3  s   &r   r  $JITCPUCodegen._customize_tm_featuresv  s    **,,r   c                <    V P                   P                  V4       R # rI   )r9  r  r  s   &&r   r  JITCPUCodegen._add_modulez  s    'r   c                    V P                   P                  V4      p\        P                  ^,          P	                  V4      p\        P                  ! \        V4      4      V^ &   R# )zbSet the environment address.

Update the GlobalVariable named *env_name* to the address of *env*.
N)r9  r  rg  rh  from_addressrc  )rQ   env_nameenvgvaddrenvptrs   &&&  r   set_envJITCPUCodegen.set_env  sG    
 66x@//A%33F;OOBsG,q	r   rv   N)r;  r<  r=  r>  r?  rP  r  r  r  r  r+  r@  rA  rB  s   @r   r  r  T  s*      $N"6-(- -r   r  c                 Z    \         P                  ! 4        \         P                  ! 4        R# )z Safe to use multiple times.
    N)r   initialize_native_targetinitialize_native_asmprinterrv   r   r   r  r    s     !##%r   c                      \         P                  ! 4       p \        P                  '       g'   V  F   pVP	                  R4      '       g   K  RW&   K"  	  V P                  4       #   \         d     R# i ; i)zrGet host CPU features using LLVM.

The features may be modified due to user setting.
See numba.config.ENABLE_AVX.
avxFr   )r   r  r   
ENABLE_AVXr  flattenrg  )r  rp   s     r   r  r    sh    "++-    <<&&"'HK 
 !!  s   A# #A21A2)r  i386i486i586i686i786i886i986)6r!   r  r  r  rg  r   r   llvmlite.bindingrV   r   llvmlite.irr  r  abcr   r   
numba.corer   r   r   numba.core.llvm_bindingsr   numba.core.runtime.nrtoptr	   numba.core.runtimer
   numba.core.compiler_lockr   numba.core.errorsr   numba.misc.inspectionr   numba.misc.llvm_pass_timingsr   	frozensetr   r   r&   rE   r2  rG   rE  r  rD  rP  r]  r  r  r  rI  r  r  r  r  rv   r   r   <module>rG     s            ' - - 8 @ $ A 7 8 >  & '
06p6 pfz(G z(zyL[ yLx	^ 24^ 4:5'F 5'n4
 4
n'B 'BT^' ^'BJ >5-J 5-p&"r   