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())
274 auto Func = Arg.getParent();
279 Node = Func->getMetadata("kernel_arg_name");
286 Node = Func->getMetadata("kernel_arg_type");
291 Node = Func->getMetadata("kernel_arg_base_type");
305 Node = Func->getMetadata("kernel_arg_access_qual");
310 Node = Func->getMetadata("kernel_arg_type_qual");
314 const DataLayout &DL = Func->getDataLayout();
387 auto &Func = MF.getFunction();
390 unsigned HiddenArgNumBytes = ST.getImplicitArgNumBytes(Func);
394 const Module *M = Func.getParent();
396 auto Int64Ty = Type::getInt64Ty(Func.getContext());
411 PointerType::get(Func.getContext(), AMDGPUAS::GLOBAL_ADDRESS);
420 else if (!Func.hasFnAttribute("amdgpu-no-hostcall-ptr"))
430 if (!Func.hasFnAttribute("amdgpu-no-default-queue")) {
439 if (!Func.hasFnAttribute("amdgpu-no-completion-action")) {
449 if (!Func.hasFnAttribute("amdgpu-no-multigrid-sync-arg")) {
547 auto &Func = MF.getFunction();
548 if (Func.getCallingConv() != CallingConv::AMDGPU_KERNEL &&
549 Func.getCallingConv() != CallingConv::SPIR_KERNEL)
553 AMDGPU::getAMDHSACodeObjectVersion(*Func.getParent());
560 Kern[".name"] = Kern.getDocument()->getNode(Func.getName());
562 (Twine(Func.getName()) + Twine(".kd")).str(), /*Copy=*/true);
563 emitKernelLanguage(Func, Kern);
564 emitKernelAttrs(Func, Kern);
584 auto &Func = MF.getFunction();
588 if (ST.getImplicitArgNumBytes(Func) == 0)
591 const Module *M = Func.getParent();
595 auto Int64Ty = Type::getInt64Ty(Func.getContext());
596 auto Int32Ty = Type::getInt32Ty(Func.getContext());
597 auto Int16Ty = Type::getInt16Ty(Func.getContext());
625 PointerType::get(Func.getContext(), AMDGPUAS::GLOBAL_ADDRESS);
634 if (!Func.hasFnAttribute("amdgpu-no-hostcall-ptr")) {
641 if (!Func.hasFnAttribute("amdgpu-no-multigrid-sync-arg")) {
648 if (!Func.hasFnAttribute("amdgpu-no-heap-ptr"))
653 if (!Func.hasFnAttribute("amdgpu-no-default-queue")) {
660 if (!Func.hasFnAttribute("amdgpu-no-completion-action")) {
690 void MetadataStreamerMsgPackV5::emitKernelAttrs(const Function &Func,
692 MetadataStreamerMsgPackV4::emitKernelAttrs(Func, Kern);
694 if (Func.getFnAttribute("uniform-work-group-size").getValueAsBool())