Lines Matching defs:F
145 if (auto F = dyn_cast<Function>(C))
146 return !Reachable.contains(F);
152 copy_if(M, std::back_inserter(ToRemove), [&](auto &&F) {
153 return !F.isIntrinsic() && !Reachable.contains(&F);
159 static inline bool isAcceleratorExecutionRoot(const Function *F) {
160 if (!F)
163 return F->getCallingConv() == CallingConv::AMDGPU_KERNEL;
166 static inline bool checkIfSupported(const Function *F, const CallBase *CB) {
167 const auto Dx = F->getName().rfind("__hipstdpar_unsupported");
172 const auto N = F->getName().substr(0, Dx);
205 auto F = std::move(Tmp.back());
208 for (auto &&N : *CGA[F]) {
282 for (auto &&F : M) {
283 if (!F.hasName())
285 if (!AllocReplacements.contains(F.getName()))
288 if (auto R = M.getFunction(AllocReplacements[F.getName()])) {
289 F.replaceAllUsesWith(R);
294 OS << "cannot be interposed, missing: " << AllocReplacements[F.getName()]
298 F.getContext().diagnose(DiagnosticInfoUnsupported(F, W,
299 F.getSubprogram(),
304 if (auto F = M.getFunction("__hipstdpar_hidden_free")) {
305 auto LibcFree = M.getOrInsertFunction("__libc_free", F->getFunctionType(),
306 F->getAttributes());
307 F->replaceAllUsesWith(LibcFree.getCallee());
309 eraseFromModule(*F);