Lines Matching defs:Func

214 void MetadataStreamerMsgPackV4::emitKernelLanguage(const Function &Func,
217 auto *Node = Func.getParent()->getNamedMetadata("opencl.ocl.version");
233 void MetadataStreamerMsgPackV4::emitKernelAttrs(const Function &Func,
236 if (auto *Node = Func.getMetadata("reqd_work_group_size"))
238 if (auto *Node = Func.getMetadata("work_group_size_hint"))
240 if (auto *Node = Func.getMetadata("vec_type_hint")) {
247 if (Func.hasFnAttribute("runtime-handle")) {
249 Func.getFnAttribute("runtime-handle").getValueAsString().str(),
252 if (Func.hasFnAttribute("device-init"))
254 else if (Func.hasFnAttribute("device-fini"))
260 auto &Func = MF.getFunction();
263 for (auto &Arg : Func.args()) {
278 const auto *Func = Arg.getParent();
283 Node = Func->getMetadata("kernel_arg_name");
290 Node = Func->getMetadata("kernel_arg_type");
295 Node = Func->getMetadata("kernel_arg_base_type");
309 Node = Func->getMetadata("kernel_arg_access_qual");
314 Node = Func->getMetadata("kernel_arg_type_qual");
318 const DataLayout &DL = Func->getDataLayout();
391 auto &Func = MF.getFunction();
394 unsigned HiddenArgNumBytes = ST.getImplicitArgNumBytes(Func);
398 const Module *M = Func.getParent();
400 auto *Int64Ty = Type::getInt64Ty(Func.getContext());
415 PointerType::get(Func.getContext(), AMDGPUAS::GLOBAL_ADDRESS);
424 else if (!Func.hasFnAttribute("amdgpu-no-hostcall-ptr"))
434 if (!Func.hasFnAttribute("amdgpu-no-default-queue")) {
443 if (!Func.hasFnAttribute("amdgpu-no-completion-action")) {
453 if (!Func.hasFnAttribute("amdgpu-no-multigrid-sync-arg")) {
558 auto &Func = MF.getFunction();
559 if (Func.getCallingConv() != CallingConv::AMDGPU_KERNEL &&
560 Func.getCallingConv() != CallingConv::SPIR_KERNEL)
564 AMDGPU::getAMDHSACodeObjectVersion(*Func.getParent());
571 Kern[".name"] = Kern.getDocument()->getNode(Func.getName());
573 (Twine(Func.getName()) + Twine(".kd")).str(), /*Copy=*/true);
574 emitKernelLanguage(Func, Kern);
575 emitKernelAttrs(Func, Kern);
595 auto &Func = MF.getFunction();
599 if (ST.getImplicitArgNumBytes(Func) == 0)
602 const Module *M = Func.getParent();
606 auto *Int64Ty = Type::getInt64Ty(Func.getContext());
607 auto *Int32Ty = Type::getInt32Ty(Func.getContext());
608 auto *Int16Ty = Type::getInt16Ty(Func.getContext());
636 PointerType::get(Func.getContext(), AMDGPUAS::GLOBAL_ADDRESS);
645 if (!Func.hasFnAttribute("amdgpu-no-hostcall-ptr")) {
652 if (!Func.hasFnAttribute("amdgpu-no-multigrid-sync-arg")) {
659 if (!Func.hasFnAttribute("amdgpu-no-heap-ptr"))
664 if (!Func.hasFnAttribute("amdgpu-no-default-queue")) {
671 if (!Func.hasFnAttribute("amdgpu-no-completion-action")) {
701 void MetadataStreamerMsgPackV5::emitKernelAttrs(const Function &Func,
703 MetadataStreamerMsgPackV4::emitKernelAttrs(Func, Kern);
705 if (Func.getFnAttribute("uniform-work-group-size").getValueAsBool())