
    X-Ph                    2    d Z ddlmZ ddlmZmZmZ d
dZd	S )a%  Find basic blocks that are likely to be executed frequently.

For example, this would not include blocks that have exception handlers.

We can use different optimization heuristics for common and rare code. For
example, we can make IR fast to compile instead of fast to execute for rare
code.
    )annotations)
BasicBlockBranchGotoentry_pointr   returnset[BasicBlock]c                   t                      }| g}|r|                                }||v r|                    |           |j        }t	          |t
                    r|                    |j                   nrt	          |t                    r]|j	        s|j
        |                    |j                   n4|                    |j                   |                    |j                   ||S )N)setpopadd
terminator
isinstancer   appendlabelr   raretraceback_entryfalsetrue)r   resultworklistblockts        X/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/mypyc/analysis/blockfreq.pyfrequently_executed_blocksr      s    !eeF}H
 )F??

5a 	)OOAG$$$$6"" 	)v )*6(((('''(((  ) M    N)r   r   r   r	   )__doc__
__future__r   mypyc.ir.opsr   r   r   r    r   r   <module>r!      s_     # " " " " " 1 1 1 1 1 1 1 1 1 1     r   