Lines Matching refs:F

73   expandMemIntrinsicUses(Function &F,
101 static bool lowerLoadRelative(Function &F) { in lowerLoadRelative() argument
102 if (F.use_empty()) in lowerLoadRelative()
106 Type *Int32Ty = Type::getInt32Ty(F.getContext()); in lowerLoadRelative()
108 for (Use &U : llvm::make_early_inc_range(F.uses())) { in lowerLoadRelative()
110 if (!CI || CI->getCalledOperand() != &F) in lowerLoadRelative()
130 static CallInst::TailCallKind getOverridingTailCallKind(const Function &F) { in getOverridingTailCallKind() argument
131 objcarc::ARCInstKind Kind = objcarc::GetFunctionClass(&F); in getOverridingTailCallKind()
139 static bool lowerObjCCall(Function &F, RTLIB::LibcallImpl NewFn, in lowerObjCCall() argument
141 assert(IntrinsicInst::mayLowerToFunctionCall(F.getIntrinsicID()) && in lowerObjCCall()
143 if (F.use_empty()) in lowerObjCCall()
152 Module *M = F.getParent(); in lowerObjCCall()
154 M->getOrInsertFunction(NewFnName, F.getFunctionType()); in lowerObjCCall()
157 Fn->setLinkage(F.getLinkage()); in lowerObjCCall()
165 CallInst::TailCallKind OverridingTCK = getOverridingTailCallKind(F); in lowerObjCCall()
167 for (Use &U : llvm::make_early_inc_range(F.uses())) { in lowerObjCCall()
170 if (CB->getCalledFunction() != &F) { in lowerObjCCall()
171 assert(objcarc::getAttachedARCFunction(CB) == &F && in lowerObjCCall()
203 if (F.getAttributes().hasAttrSomewhere(Attribute::Returned, &Index) && in lowerObjCCall()
233 static bool canEmitLibcall(const TargetMachine *TM, Function *F, in canEmitLibcall() argument
238 const TargetLowering *TLI = TM->getSubtargetImpl(*F)->getTargetLowering(); in canEmitLibcall()
242 static bool canEmitMemcpy(const TargetMachine *TM, Function *F) { in canEmitMemcpy() argument
246 const TargetLowering *TLI = TM->getSubtargetImpl(*F)->getTargetLowering(); in canEmitMemcpy()
307 Function &F, DenseMap<Constant *, GlobalVariable *> &CMap) const { in expandMemIntrinsicUses() argument
308 Intrinsic::ID ID = F.getIntrinsicID(); in expandMemIntrinsicUses()
311 for (User *U : llvm::make_early_inc_range(F.users())) { in expandMemIntrinsicUses()
468 for (Function &F : M) { in lowerIntrinsics()
469 switch (F.getIntrinsicID()) { in lowerIntrinsics()
478 Changed |= expandMemIntrinsicUses(F, CMap); in lowerIntrinsics()
481 Changed |= lowerLoadRelative(F); in lowerIntrinsics()
485 Changed |= forEachCall(F, [&](CallInst *CI) { in lowerIntrinsics()
496 forEachCall(F, [&](CallInst *CI) { in lowerIntrinsics()
510 Changed |= lowerObjCCall(F, RTLIB::objc_autorelease); in lowerIntrinsics()
513 Changed |= lowerObjCCall(F, RTLIB::objc_autoreleasePoolPop); in lowerIntrinsics()
516 Changed |= lowerObjCCall(F, RTLIB::objc_autoreleasePoolPush); in lowerIntrinsics()
519 Changed |= lowerObjCCall(F, RTLIB::objc_autoreleaseReturnValue); in lowerIntrinsics()
522 Changed |= lowerObjCCall(F, RTLIB::objc_copyWeak); in lowerIntrinsics()
525 Changed |= lowerObjCCall(F, RTLIB::objc_destroyWeak); in lowerIntrinsics()
528 Changed |= lowerObjCCall(F, RTLIB::objc_initWeak); in lowerIntrinsics()
531 Changed |= lowerObjCCall(F, RTLIB::objc_loadWeak); in lowerIntrinsics()
534 Changed |= lowerObjCCall(F, RTLIB::objc_loadWeakRetained); in lowerIntrinsics()
537 Changed |= lowerObjCCall(F, RTLIB::objc_moveWeak); in lowerIntrinsics()
540 Changed |= lowerObjCCall(F, RTLIB::objc_release, true); in lowerIntrinsics()
543 Changed |= lowerObjCCall(F, RTLIB::objc_retain, true); in lowerIntrinsics()
546 Changed |= lowerObjCCall(F, RTLIB::objc_retainAutorelease); in lowerIntrinsics()
549 Changed |= lowerObjCCall(F, RTLIB::objc_retainAutoreleaseReturnValue); in lowerIntrinsics()
552 Changed |= lowerObjCCall(F, RTLIB::objc_retainAutoreleasedReturnValue); in lowerIntrinsics()
555 Changed |= lowerObjCCall(F, RTLIB::objc_claimAutoreleasedReturnValue); in lowerIntrinsics()
558 Changed |= lowerObjCCall(F, RTLIB::objc_retainBlock); in lowerIntrinsics()
561 Changed |= lowerObjCCall(F, RTLIB::objc_storeStrong); in lowerIntrinsics()
564 Changed |= lowerObjCCall(F, RTLIB::objc_storeWeak); in lowerIntrinsics()
568 lowerObjCCall(F, RTLIB::objc_unsafeClaimAutoreleasedReturnValue); in lowerIntrinsics()
571 Changed |= lowerObjCCall(F, RTLIB::objc_retainedObject); in lowerIntrinsics()
574 Changed |= lowerObjCCall(F, RTLIB::objc_unretainedObject); in lowerIntrinsics()
577 Changed |= lowerObjCCall(F, RTLIB::objc_unretainedPointer); in lowerIntrinsics()
580 Changed |= lowerObjCCall(F, RTLIB::objc_retain_autorelease); in lowerIntrinsics()
583 Changed |= lowerObjCCall(F, RTLIB::objc_sync_enter); in lowerIntrinsics()
586 Changed |= lowerObjCCall(F, RTLIB::objc_sync_exit); in lowerIntrinsics()
591 Changed |= forEachCall(F, [&](CallInst *CI) { in lowerIntrinsics()
595 const TargetLowering *TL = TM->getSubtargetImpl(F)->getTargetLowering(); in lowerIntrinsics()
596 unsigned Op = TL->IntrinsicIDToISD(F.getIntrinsicID()); in lowerIntrinsics()
623 auto LookupTTI = [this](Function &F) -> TargetTransformInfo & { in runOnModule() argument
624 return this->getAnalysis<TargetTransformInfoWrapperPass>().getTTI(F); in runOnModule()
626 auto LookupTLI = [this](Function &F) -> TargetLibraryInfo & { in runOnModule() argument
627 return this->getAnalysis<TargetLibraryInfoWrapperPass>().getTLI(F); in runOnModule()
658 auto LookupTTI = [&FAM](Function &F) -> TargetTransformInfo & { in run() argument
659 return FAM.getResult<TargetIRAnalysis>(F); in run()
661 auto LookupTLI = [&FAM](Function &F) -> TargetLibraryInfo & { in run() argument
662 return FAM.getResult<TargetLibraryAnalysis>(F); in run()