parameters: (self)
return_statement: return namedtuple('FinalizerResult', ['hsail', 'brig'])(hsail, brig)
docstring: Finalize module and return the HSAIL code
docstring_summary: Finalize module and return the HSAIL code
docstring_tokens: Finalize module and return the HSAIL code
function: def generateGCN(self):
          """
          Finalize module and return the HSAIL code
          """
          assert not self._finalized, "Module finalized already"
  
          # Link dependencies
          main = self._llvm_modules[0]
          for dep in self._llvm_modules[1:]:
              self._hlc.link(main, dep)
  
          # link bitcode
          self.link_builtins(main)
  
          # Optimize
          self._hlc.optimize(main)
  
          if config.DUMP_OPTIMIZED:
              print(self._hlc.to_string(main))
  
          # create HSAIL
          hsail = self._hlc.to_hsail(main)
  
          # Finalize the llvm to BRIG
          brig = self._hlc.to_brig(main)
  
          self._finalized = True
  
          # Clean up main; other modules are destroyed at linking
          self._hlc.destroy_module(main)
  
          if config.DUMP_ASSEMBLY:
              print(hsail)
  
          return namedtuple('FinalizerResult', ['hsail', 'brig'])(hsail, brig)
function_tokens: def generateGCN ( self ) : assert not self . _finalized , "Module finalized already" # Link dependencies main = self . _llvm_modules [ 0 ] for dep in self . _llvm_modules [ 1 : ] : self . _hlc . link ( main , dep ) # link bitcode self . link_builtins ( main ) # Optimize self . _hlc . optimize ( main ) if config . DUMP_OPTIMIZED : print ( self . _hlc . to_string ( main ) ) # create HSAIL hsail = self . _hlc . to_hsail ( main ) # Finalize the llvm to BRIG brig = self . _hlc . to_brig ( main ) self . _finalized = True # Clean up main; other modules are destroyed at linking self . _hlc . destroy_module ( main ) if config . DUMP_ASSEMBLY : print ( hsail ) return namedtuple ( 'FinalizerResult' , [ 'hsail' , 'brig' ] ) ( hsail , brig )