message: Enabled generating code for subroutines
diff: @@ -424,8 +424,8 @@ void Function::emitCode(FunctionEmitContext *ctx, llvm::Function *function, Sour
  llvm::LLVMContext &fContext = function->getContext();
  llvm::NamedMDNode *mdKernels = m->module->getOrInsertNamedMetadata("genx.kernels");
  - std::string AsmName =
  - (m->module->getName() + llvm::Twine('_') + llvm::Twine(mdKernels->getNumOperands()) + llvm::Twine(".asm"))
  + std::string AsmName = (m->module->getName() + llvm::Twine('_') + llvm::Twine(mdKernels->getNumOperands()) +
  + llvm::Twine(".asm"))
  .str();
  // Kernel arg kinds
  @@ -511,10 +511,10 @@ void Function::GenerateIR() {
  // And we can now go ahead and emit the code
  #ifdef ISPC_GENX_ENABLED
  if (g->target->getISA() == Target::GENX) {
  - // For GEN target we emit code only for unmasked version of a kernel.
  - // TODO_GEN: revise this when implementing subroutines calls.
  + // For GEN target we emit code only for unmasked version of a kernel and subroutines.
  + // TODO_GEN: revise this one more time after testing of subroutines calls.
  const FunctionType *type = CastType<FunctionType>(sym->type);
  - if (type->isUnmasked) {
  + if (type->isExported && type->isUnmasked || !type->isExported) {
  FunctionEmitContext ec(this, sym, function, firstStmtPos);
  emitCode(&ec, function, firstStmtPos);
  }
  