Lines Matching refs:F
81 static void collectCallers(Function *F, DenseSet<Function *> &Callers) { in collectCallers() argument
82 for (auto U : F->users()) { in collectCallers()
95 auto *F = I->getParent()->getParent(); in collectFunctionUsers() local
96 if (Funcs.insert(F).second) in collectFunctionUsers()
97 collectCallers(F, Funcs); in collectFunctionUsers()
110 for (auto &F : M.functions()) { in runOnModule() local
111 if (F.hasFnAttribute("enqueued-block")) { in runOnModule()
112 if (!F.hasName()) { in runOnModule()
116 F.setName(Name); in runOnModule()
118 LLVM_DEBUG(dbgs() << "found enqueued kernel: " << F.getName() << '\n'); in runOnModule()
119 auto RuntimeHandle = (F.getName() + ".runtime_handle").str(); in runOnModule()
130 for (auto U : F.users()) { in runOnModule()
138 F.addFnAttr("runtime-handle", RuntimeHandle); in runOnModule()
139 F.setLinkage(GlobalValue::ExternalLinkage); in runOnModule()
145 for (auto F : Callers) { in runOnModule() local
146 if (F->getCallingConv() != CallingConv::AMDGPU_KERNEL) in runOnModule()
148 F->addFnAttr("calls-enqueue-kernel"); in runOnModule()
149 LLVM_DEBUG(dbgs() << "mark enqueue_kernel caller:" << F->getName() << '\n'); in runOnModule()