ó
\K]c           @@ s¨   d  d l  m Z m Z d  d l m Z d  d l m Z d  d l	 m
 Z
 d  d l m Z m Z d d l m Z m Z m Z d e f d	 „  ƒ  YZ d
 e f d „  ƒ  YZ d S(   i    (   t   print_functiont   absolute_import(   t   binding(   t   core(   t   utils(   t   BaseCPUCodegent   CodeLibraryi   (   t
   DATALAYOUTt   TRIPLEt   hlct   HSACodeLibraryc           B@ s,   e  Z d  „  Z d „  Z d „  Z d „  Z RS(   c         C@ s   d  S(   N(    (   t   selft	   ll_module(    (    s0   lib/python2.7/site-packages/numba/roc/codegen.pyt   _optimize_functions   s    c         C@ s   d  S(   N(    (   R   (    (    s0   lib/python2.7/site-packages/numba/roc/codegen.pyt   _optimize_final_module   s    c         C@ s   d  S(   N(    (   R   (    (    s0   lib/python2.7/site-packages/numba/roc/codegen.pyt   _finalize_specific   s    c         C@ s;   t  j ƒ  } | j t |  j ƒ ƒ | j ƒ  } t | j ƒ S(   s2   
        Get the human-readable assembly.
        (   R	   t   Modulet	   load_llvmt   strt   _final_modulet   finalizet   hsail(   R   t   mt   out(    (    s0   lib/python2.7/site-packages/numba/roc/codegen.pyt   get_asm_str   s    (   t   __name__t
   __module__R   R   R   R   (    (    (    s0   lib/python2.7/site-packages/numba/roc/codegen.pyR
   
   s   			t   JITHSACodegenc           B@ s;   e  Z e Z d  „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C@ sJ   t  | j ƒ g  k s! t d ƒ ‚ t t j |  _ t j |  j ƒ |  _	 d  S(   Ns   Module isn't empty(
   t   listt   global_variablest   AssertionErrorR   R   t   MACHINE_BITSt   _data_layoutt   llt   create_target_datat   _target_data(   R   t   llvm_module(    (    s0   lib/python2.7/site-packages/numba/roc/codegen.pyt   _init!   s    !c         C@ s   t  j | ƒ } t | _ | S(   N(   t   lcR   R   t   triple(   R   t   namet	   ir_module(    (    s0   lib/python2.7/site-packages/numba/roc/codegen.pyt   _create_empty_module&   s    	c         C@ s
   t  ‚ d  S(   N(   t   NotImplementedError(   R   (    (    s0   lib/python2.7/site-packages/numba/roc/codegen.pyt   _module_pass_manager+   s    c         C@ s
   t  ‚ d  S(   N(   R+   (   R   R$   (    (    s0   lib/python2.7/site-packages/numba/roc/codegen.pyt   _function_pass_manager.   s    c         C@ s   d  S(   N(    (   R   t   module(    (    s0   lib/python2.7/site-packages/numba/roc/codegen.pyt   _add_module1   s    (	   R   R   R
   t   _library_classR%   R*   R,   R-   R/   (    (    (    s0   lib/python2.7/site-packages/numba/roc/codegen.pyR      s   				N(   t
   __future__R    R   t   llvmliteR   R!   t   llvmlite.llvmpyR   R&   t   numbaR   t   numba.targets.codegenR   R   R	   R   R   R
   R   (    (    (    s0   lib/python2.7/site-packages/numba/roc/codegen.pyt   <module>   s   