+
     þÎj24  ã                   óê   € ^ RI t ^ RIt^ RI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 R4      t ! R	 R
4      t]! R. RO4      tR t ! R R4      t]! RRR.4      t ! R R]4      tR# )é    N)Ú
namedtuple)ÚSequence)Úcontextmanager)Úcached_property)Úconfigc                   ó<   a € ] tR t^t o RtR.tR tR tR tRt	V t
R# )ÚRecordLLVMPassTimingsLegacyú9A helper context manager to track LLVM pass timings.
    Ú_datac                ó2   € \         P                  ! R4       V # )ú)Enables the pass timing in LLVM.
        T)ÚllvmÚset_time_passes©Úselfs   &ÚR/opt/data/home/.local/lib/python3.14/site-packages/numba/misc/llvm_pass_timings.pyÚ	__enter__Ú%RecordLLVMPassTimingsLegacy.__enter__   s   € ô 	×Ò˜TÔ"Øˆó    c                óf   € \         P                  ! 4       V n        \         P                  ! R4       R# )ú2Reset timings and save report internally.
        FN)r   Úreport_and_reset_timingsr   r   ©r   Úexc_valÚexc_typeÚexc_tbs   &&&&r   Ú__exit__Ú$RecordLLVMPassTimingsLegacy.__exit__   s%   € ô ×2Ò2Ó4ˆŒ
Ü×Ò˜UÔ#Ùr   c                ó,   € \        V P                  4      # ©zTRetrieve timing data for processing.

Returns
-------
timings: ProcessedPassTimings
©ÚProcessedPassTimingsr   r   s   &r   ÚgetÚRecordLLVMPassTimingsLegacy.get!   ó   € ô $ D§J¡JÓ/Ð/r   )r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	__slots__r   r   r#   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r	   r	      s'   ø‡ € ñð �	€Iòò÷0ð 0r   r	   c                   óD   a € ] tR t^+t o RtRR.tR tR tR tR t	Rt
V tR	# )
ÚRecordLLVMPassTimingsr
   r   Ú_pbc                ó    € Wn         R V n        R # ©N)r2   r   )r   Úpbs   &&r   Ú__init__ÚRecordLLVMPassTimings.__init__1   s   € ØŒØˆŽ
r   c                ó:   € V P                   P                  4        V # )r   )r2   Ústart_pass_timingr   s   &r   r   ÚRecordLLVMPassTimings.__enter__5   s   € ð 	�‰×"Ñ"Ô$Øˆr   c                óD   € V P                   P                  4       V n        R# )r   N)r2   Úfinish_pass_timingr   r   s   &&&&r   r   ÚRecordLLVMPassTimings.__exit__;   s   € ð —X‘X×0Ñ0Ó2ˆŒ
Ùr   c                ó,   € \        V P                  4      # r    r!   r   s   &r   r#   ÚRecordLLVMPassTimings.getA   r%   r   )r   r2   N)r&   r'   r(   r)   r*   r+   r6   r   r   r#   r,   r-   r.   s   @r   r1   r1   +   s/   ø‡ € ñð ˜%Ð €Iòòò÷0ð 0r   r1   ÚPassTimingRecordc                óÐ   aa€ V R,          oSP                   R8X  g   Q hV3R lpR Uu. uF
  q!! V4      NK  	  upo\        R V 4      pV3R lp\        \        WC4      4      # u upi )z¶Adjust timing records because of truncated information.

Details: The percent information can be used to improve the timing
information.

Returns
-------
res: List[PassTimingRecord]
ÚTotalc                 ó`   <aaa€ V  R 2oV  R2o\         P                  ! S4      oVVVV3R lpV# )Ú_timeÚ_percentc                óL   <€ S! S4      pWS,          ,          R,          pW S&   V # )z'Compute percent x total_time = adjustedg{®Gáz„?© )ÚdÚtotalÚadjustedÚpercent_attrÚ	time_attrÚtime_getterÚ	total_recs   &  €€€€r   ÚadjustÚ6_adjust_timings.<locals>.make_adjuster.<locals>.adjustn   s*   ø€ á 	Ó*ˆEØ �Õ.°Õ5ˆHØ#ˆi‰LØˆHr   )ÚoperatorÚ
attrgetter)ÚattrrO   rK   rL   rM   rN   s   & @@@€r   Úmake_adjusterÚ&_adjust_timings.<locals>.make_adjusteri   s;   û€ Ø�f˜E�Nˆ	Ø˜˜xÐ(ˆÜ×)Ò)¨)Ó4ˆ÷	ð 	ð ˆr   c                 ó"   € V P                  4       # r4   )Ú_asdict©Úxs   &r   Ú<lambda>Ú!_adjust_timings.<locals>.<lambda>}   s
   € ˜!Ÿ)™)œ+r   c                 ó<   <€ S F  pV! V 4      p K  	  \        R/ V B # )NrG   )r@   )rH   ÚfnÚadj_fnss   & €r   ÚchainedÚ _adjust_timings.<locals>.chained   s&   ø€ ãˆBÙ�1“ŠAñ ô  Ñ$ !Ñ$Ð$r   éÿÿÿÿ)ÚuserÚsystemÚuser_systemÚwall)Ú	pass_nameÚmapÚlist)ÚrecordsrT   rY   Údictsr_   r^   rN   s   &    @@r   Ú_adjust_timingsrk   \   st   ù€ ð ˜•€IØ×Ñ 'Ô)Ð)Ð)õñ  #LóÙ"K˜Qˆ�aÖÑ"Kñ€Gô
 Ñ% wÓ/€Eõ%ô ”�GÓ#Ó$Ð$ùòs   ©A#c                   óh   a € ] tR t^‰t o RtR tR tR tR tR t	R t
RR lt]R	 4       tR
 tRtV tR# )r"   z�A class for processing raw timing report from LLVM.

The processing is done lazily so we don't waste time processing unused
timing information.
c                ó   € Wn         R # r4   ©Ú	_raw_data)r   Úraw_datas   &&r   r6   ÚProcessedPassTimings.__init__�   s   € Ø!Žr   c                ó,   € \        V P                  4      # r4   )Úboolro   r   s   &r   Ú__bool__ÚProcessedPassTimings.__bool__“   s   € Ü�D—N‘NÓ#Ð#r   c                ó   € V P                   # )z7Returns the raw string data.

Returns
-------
res: str
rn   r   s   &r   Úget_raw_dataÚ!ProcessedPassTimings.get_raw_data–   s   € ð �~‰~Ðr   c                óD   € V P                  4       R,          P                  # )zHCompute the total time spend in all passes.

Returns
-------
res: float
ra   )Úlist_recordsÚ	wall_timer   s   &r   Úget_total_timeÚ#ProcessedPassTimings.get_total_timeŸ   s   € ð × Ñ Ó" 2Õ&×0Ñ0Ð0r   c                ó   € V P                   # )z[Get the processed data for the timing report.

Returns
-------
res: List[PassTimingRecord]
)Ú
_processedr   s   &r   rz   Ú!ProcessedPassTimings.list_records¨   s   € ð �‰Ðr   c                ó‚   € V P                  4       p\        P                  ! R4      p\        P                  ! WRR V4      # )aG  Returns the top(n) most time-consuming (by wall-time) passes.

Parameters
----------
n: int
    This limits the maximum number of items to show.
    This function will show the ``n`` most time-consuming passes.

Returns
-------
res: List[PassTimingRecord]
    Returns the top(n) most time-consuming passes in descending order.
r{   Nra   )rz   rQ   rR   ÚheapqÚnlargest)r   Únri   Úkeys   &&  r   Úlist_topÚProcessedPassTimings.list_top±   s9   € ð ×#Ñ#Ó%ˆÜ×!Ò! +Ó.ˆÜ�~Š~˜a¨¨" ¨sÓ3Ð3r   c           	     ó$  aa€ . oRV,          oVV3R lpV! RV P                  4       R R24       V! R4       V P                  V4       F4  pV! RVP                  R RVP                  R	 R
VP                   24       K6  	  RP                  S4      # )aJ  Return a string summarizing the timing information.

Parameters
----------
topn: int; optional
    This limits the maximum number of items to show.
    This function will show the ``topn`` most time-consuming passes.
indent: int; optional
    Set the indentation level. Defaults to 0 for no indentation.

Returns
-------
res: str
Ú c                 ó2   <€ SP                  S V  24       R # r4   )Úappend)ÚargÚbufÚprefixs   &€€r   ÚapÚ(ProcessedPassTimings.summary.<locals>.apÕ   s   ø€ Ø�J‰J˜&˜ # Ð'Ö(r   zTotal ú.4fÚszTop timings:z  zs (Ú5z%) Ú
)r|   r†   r{   Úwall_percentrf   Újoin)r   ÚtopnÚindentr�   Úpr�   rŽ   s   &&&  @@r   ÚsummaryÚProcessedPassTimings.summaryÃ   s�   ù€ ð ˆØ�v•ˆö	)ñ 	ˆV�D×'Ñ'Ó)¨#Ð.¨aÐ0Ô1Ù
ˆ>ÔØ—‘˜tÖ$ˆAÙ��A—K‘K Ð$ C¨¯©°qÐ'9¸¸Q¿[¹[¸MÐJÖKñ %à�y‰y˜‹~Ðr   c                ó"   € V P                  4       # )zdA cached property for lazily processing the data and returning it.

See ``_process()`` for details.
)Ú_processr   s   &r   r   ÚProcessedPassTimings._processedÞ   s   € ð �}‰}‹Ðr   c                óT   € R p\        V! V P                  4      4      p\        V4      # )z‰Parses the raw string data from LLVM timing report and attempts
to improve the data by recomputing the times
(See `_adjust_timings()``).
c              3  óF  "  € V P                  4       pRpRV R2p\        V4      pRRRRRR	R
RRRRR/pV F_  p\        P                  ! W64      pV'       g   K#  \        P                  ! RV4      pV U	u. uF  q•V	P                  4       ,          NK  	  p
p	 M	  X
R,          R8X  g   Q h. pRpRpV
RR  FL  p	V	R8X  d   WÜ,          pK  VP                  V	 R24       VP                  V	 R24       VRV RV R2,          pKN  	  / p\        P                   F  p	W›9  g   K  V	R8w  g   K  RWé&   K  	  VR,          pV F£  p\        P                  ! WÖ4      pVf   K  \        VP                  4       4      p \        W°4       U	Uu/ uF  w  rŸYŸe   \        V4      MRbK  	  pp	pVP                  V4       V R,          p\        R RV/VB pVx € VP                  R8X  g   K£   M	  RP                  V4      pRV9   d   R# V'       d   \!        RV 24      hR# u up	i u upp	i 5i)!z_A generator that parses the raw_data line-by-line to extract
timing information for each pass.
z[a-zA-Z+ ]+z(?:\s*-+z-+)+z	User Timerb   zSystem Timerc   zUser+Systemrd   z	Wall Timere   ÚInstrÚinstructionÚNamerf   z[a-zA-Z][a-zA-Z+ ]+z\s*((?:[0-9]+\.)?[0-9]+)Ú NrD   rE   z\s+(?:z\s*\(z%\)|-+)g        z\s*(.*)rB   r”   z Analysis execution timing reportz'unexpected text after parser finished:
ra   rG   )Ú
splitlinesÚiterÚreÚmatchÚfindallÚstripr‹   r@   Ú_fieldsrh   ÚgroupsÚzipÚfloatÚupdaterf   r–   Ú
ValueError)rp   ÚlinesÚ	colheaderÚmulticolheadersÚ	line_iterÚ
header_mapÚlnÚmÚraw_headersÚkÚheadersÚattrsr„   ÚpatÚmissingÚvÚdatarf   ÚrecÚ	remainings   &                   r   ÚparseÚ,ProcessedPassTimings._process.<locals>.parseì   sN  é € ð ×'Ñ'Ó)ˆEØ&ˆIà!)¨)¨°DÐ9ˆOä˜U›ˆIð ˜VØ˜xØ˜}Ø˜VØ˜Ø˜ðˆJó  �Ü—H’H˜_Ó1�ß‘1ä"$§*¢*Ð-CÀRÓ"H�KÙ>IÓJ¹k¸¨!¯'©'«)×4Ð4¹k�GÐJÙñ  ð ˜2•; +Ô-Ð-Ð-àˆEØ+ˆAØˆCØ˜S˜b“\�Ø˜Ô%Ø•H’Cà—L‘L A 3 e Ô-Ø—L‘L A 3 h Ô0Ø˜f Q C u¨Q¨C¨wÐ7Õ7’Cñ "ð ˆGÜ%×-Ô-�Ø–> a¨;Ö&6Ø!$�G“Jñ .ð �:ÕˆCÛ�Ü—H’H˜SÓ%�Ø”=Ü# A§H¡H£JÓ/�Hä(+¨EÔ(<ô>Ù(<¡ ð ª=œu Qœx¸cÒAÙ(<ð ñ >à—K‘K Ô(Ø (¨¥�IÜ*ñ Ø"+ðØ/3ñ�Cð ’IØ—}‘}¨Ö/áñ  ð  Ÿ	™	 )Ó,ˆIð 2°YÔ>ÙçÜ Ø>¸y¸kÐJóð ñ ùò[ Kùó6>ùsC   ‚AH!ÁH!Á4HÂB	H!Ä!H!Ä*-H!Å'H!ÆHÆ<H!Ç %H!ÈH!)rh   ro   rk   )r   rÂ   ri   s   &  r   r�   ÚProcessedPassTimings._processæ   s)   € òH	ôV ‘u˜TŸ^™^Ó,Ó-ˆÜ˜wÓ'Ð'r   rn   N)é   r   )r&   r'   r(   r)   r*   r6   rt   rw   r|   rz   r†   rš   r   r   r�   r,   r-   r.   s   @r   r"   r"   ‰   sM   ø‡ € ñò"ò$òò1òò4ô$ð6 ñó ð÷R(ð R(r   r"   ÚNamedTimingsÚnameÚtimingsc                   óˆ   a € ] tR tRt o RtR t]R 4       t]R 4       tR t	R t
R t]R	 4       tRR
 ltR tR tR tRtV tR# )ÚPassTimingsCollectioni>  z|A collection of pass timings.

This class implements the ``Sequence`` protocol for accessing the
individual timing records.
c                ó    € Wn         . V n        R # r4   ©Ú_nameÚ_records)r   rÇ   s   &&r   r6   ÚPassTimingsCollection.__init__E  s   € ØŒ
ØˆŽr   c              #  ó   "  € \         P                  '       dM   \        4       ;_uu_ 4       pRx € RRR4       XP                  4       pV'       d   V P	                  W4       R# R# Rx € R#   + '       g   i     LC; i5i)zÜRecord new timings and append to this collection.

Note: this is mainly for internal use inside the compiler pipeline.

See also ``RecordLLVMPassTimingsLegacy``

Parameters
----------
name: str
    Name for the records.
N)r   ÚLLVM_PASS_TIMINGSr	   r#   Ú_append)r   rÇ   rÈ   rÀ   s   &&  r   Úrecord_legacyÚ#PassTimingsCollection.record_legacyI  sR   é € ô ×#×#Ð#ä,×.Ô.°'Û÷ /à—+‘+“-ˆCçØ—‘˜TÖ'ñ õ ÷ /×.üs!   ‚)A>«A+°A>ÁA>Á+A;	Á6A>c              #  ó  "  € \         P                  '       dN   \        V4      ;_uu_ 4       pRx € RRR4       XP                  4       pV'       d   V P	                  W4       R# R# Rx € R#   + '       g   i     LC; i5i)zÖRecord new timings and append to this collection.

Note: this is mainly for internal use inside the compiler pipeline.

See also ``RecordLLVMPassTimings``

Parameters
----------
name: str
    Name for the records.
N)r   rÑ   r1   r#   rÒ   )r   rÇ   r5   rÈ   rÀ   s   &&&  r   ÚrecordÚPassTimingsCollection.recordb  sT   é € ô ×#×#Ð#ä& r×*Ô*¨gÛ÷ +à—+‘+“-ˆCçØ—‘˜TÖ'ñ õ ÷ +×*üs!   ‚*A?¬A,±A?ÁA?Á,A<	Á7A?c                óN   € V P                   P                  \        W4      4       R# )z‡Append timing records

Parameters
----------
name: str
    Name for the records.
timings: ProcessedPassTimings
    the timing records.
N)rÎ   r‹   rÆ   )r   rÇ   rÈ   s   &&&r   rÒ   ÚPassTimingsCollection._append{  s   € ð 	�‰×Ñœ\¨$Ó8Ö9r   c                ób   € V P                   '       d   \        R V P                    4       4      # R# )zµComputes the sum of the total time across all contained timings.

Returns
-------
res: float or None
    Returns the total number of seconds or None if no timings were
    recorded
c              3   óT   "  € T F  qP                   P                  4       x € K   	  R # 5ir4   ©rÈ   r|   )Ú.0Úrs   & r   Ú	<genexpr>Ú7PassTimingsCollection.get_total_time.<locals>.<genexpr>‘  s   é € ÐI¹=°a—y‘y×/Ñ/×1Ð1»=ùs   ‚&(N)rÎ   Úsumr   s   &r   r|   Ú$PassTimingsCollection.get_total_time‡  s%   € ð �=�=ˆ=ÜÑI¸4¿=º=ÓIÓIÐIár   c                ó4   € \        V P                  R RR7      # )zqReturns the timings in descending order of total time duration.

Returns
-------
res: List[ProcessedPassTimings]
c                 ó6   € V P                   P                  4       # r4   rÜ   rX   s   &r   rZ   Ú:PassTimingsCollection.list_longest_first.<locals>.<lambda>�  s   €  A§I¡I×$<Ñ$<Ô$>r   T)r…   Úreverse)ÚsortedrÎ   r   s   &r   Úlist_longest_firstÚ(PassTimingsCollection.list_longest_first•  s   € ô �d—m‘mÙ>Ø"ô$ð 	$r   c                ó$   € V P                   '       * # )z	
        ©rÎ   r   s   &r   Úis_emptyÚPassTimingsCollection.is_empty   s   € ð —=‘=Ô Ð r   c                óæ  € V P                   '       d   R# . pVP                  pV! RV P                   24       V P                  4       pV! RVR 24       \	        V P
                  4       Fu  w  rVV! RV RVP                   24       VP                  P                  4       V,          ^d,          pV! RVR R	24       V! VP                  P                  V^R
7      4       Kw  	  RP                  V4      # )a1  Return a string representing the summary of the timings.

Parameters
----------
topn: int; optional, default=5.
    This limits the maximum number of items to show.
    This function will show the ``topn`` most time-consuming passes.

Returns
-------
res: str

See also ``ProcessedPassTimings.summary()``
zNo pass timings were recordedzPrinting pass timings for zTotal time: r‘   z== #r‰   z
 Percent: z.1fÚ%)r—   r˜   r”   )
rì   r‹   rÍ   r|   Ú	enumeraterÎ   rÇ   rÈ   rš   r–   )r   r—   r�   r�   Úoverall_timeÚirÞ   Úpercents   &&      r   rš   ÚPassTimingsCollection.summary¦  sÛ   € ð �=�=ˆ=Ù2àˆCØ—‘ˆBÙÐ+¨D¯J©J¨<Ð8Ô9Ø×.Ñ.Ó0ˆLÙ�˜l¨3Ð/Ð0Ô1Ü! $§-¡-Ö0‘�Ù�T˜!˜˜A˜aŸf™f˜XÐ&Ô'ØŸ)™)×2Ñ2Ó4°|ÕCÀcÕI�Ù�Z ¨˜}¨AÐ.Ô/Ù�1—9‘9×$Ñ$¨$°qÐ$Ó9Ö:ñ	 1ð
 —9‘9˜S“>Ð!r   c                ó(   € V P                   V,          # )zšGet the i-th timing record.

Returns
-------
res: (name, timings)
    A named tuple with two fields:

    - name: str
    - timings: ProcessedPassTimings
rë   )r   rò   s   &&r   Ú__getitem__Ú!PassTimingsCollection.__getitem__Ä  s   € ð �}‰}˜QÕÐr   c                ó,   € \        V P                  4      # )z#Length of this collection.
        )ÚlenrÎ   r   s   &r   Ú__len__ÚPassTimingsCollection.__len__Ñ  s   € ô �4—=‘=Ó!Ð!r   c                ó"   € V P                  4       # r4   )rš   r   s   &r   Ú__str__ÚPassTimingsCollection.__str__Ö  s   € Ø�|‰|‹~Ðr   rÌ   N)rÅ   )r&   r'   r(   r)   r*   r6   r   rÓ   rÖ   rÒ   r|   rè   Úpropertyrì   rš   rö   rú   rý   r,   r-   r.   s   @r   rÊ   rÊ   >  ss   ø‡ € ñòð ñó ðð0 ñó ðò0
:òò	$ð ñ!ó ð!ô
"ò< ò"÷
ð r   rÊ   )
Ú	user_timeÚuser_percentÚsystem_timeÚsystem_percentÚuser_system_timeÚuser_system_percentr{   r•   rf   r¢   )r§   rQ   r‚   Úcollectionsr   Úcollections.abcr   Ú
contextlibr   Ú	functoolsr   Ú
numba.corer   Úllvmlite.bindingÚbindingr   r	   r1   r@   rk   r"   rÆ   rÊ   rG   r   r   Ú<module>r     s~   ðÛ 	Û Û Ý "Ý $Ý %Ý %å å ÷0ñ 0÷:0ñ 0ñ@ ØòóÐ ò"*%÷Zo(ñ o(ñd ˜.¨6°9Ð*=Ó>€ôY˜Hö Yr   