Lines Matching refs:Arg
55 static const Value *FindSingleUseIdentifiedObject(const Value *Arg) { in FindSingleUseIdentifiedObject() argument
56 if (Arg->hasOneUse()) { in FindSingleUseIdentifiedObject()
57 if (const BitCastInst *BC = dyn_cast<BitCastInst>(Arg)) in FindSingleUseIdentifiedObject()
59 if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Arg)) in FindSingleUseIdentifiedObject()
62 if (IsForwarding(GetBasicARCInstKind(Arg))) in FindSingleUseIdentifiedObject()
64 cast<CallInst>(Arg)->getArgOperand(0)); in FindSingleUseIdentifiedObject()
65 if (!IsObjCIdentifiedObject(Arg)) in FindSingleUseIdentifiedObject()
67 return Arg; in FindSingleUseIdentifiedObject()
72 if (IsObjCIdentifiedObject(Arg)) { in FindSingleUseIdentifiedObject()
73 for (const User *U : Arg->users()) in FindSingleUseIdentifiedObject()
74 if (!U->use_empty() || GetRCIdentityRoot(U) != Arg) in FindSingleUseIdentifiedObject()
77 return Arg; in FindSingleUseIdentifiedObject()
254 TopDownPtrState &getPtrTopDownState(const Value *Arg) { in getPtrTopDownState() argument
255 return PerPtrTopDown[Arg]; in getPtrTopDownState()
261 BottomUpPtrState &getPtrBottomUpState(const Value *Arg) { in getPtrBottomUpState() argument
262 return PerPtrBottomUp[Arg]; in getPtrBottomUpState()
267 bottom_up_ptr_iterator findPtrBottomUpState(const Value *Arg) { in findPtrBottomUpState() argument
268 return PerPtrBottomUp.find(Arg); in findPtrBottomUpState()
513 void MoveCalls(Value *Arg, RRInfo &RetainsToMove, RRInfo &ReleasesToMove,
526 Value *Arg, bool KnownSafe,
580 const Value *Arg = GetArgRCIdentityRoot(RetainRV); in OptimizeRetainRVCall() local
581 ImmutableCallSite CS(Arg); in OptimizeRetainRVCall()
606 GetArgRCIdentityRoot(I) == Arg) { in OptimizeRetainRVCall()
760 const Value *Arg = Call->getArgOperand(0); in OptimizeIndividualCalls() local
761 Arg = FindSingleUseIdentifiedObject(Arg); in OptimizeIndividualCalls()
762 if (Arg) { in OptimizeIndividualCalls()
816 const Value *Arg = GetArgRCIdentityRoot(Inst); in OptimizeIndividualCalls() local
819 if (IsNullOrUndef(Arg)) { in OptimizeIndividualCalls()
838 Worklist.push_back(std::make_pair(Inst, Arg)); in OptimizeIndividualCalls()
842 Arg = Pair.second; in OptimizeIndividualCalls()
844 const PHINode *PN = dyn_cast<PHINode>(Arg); in OptimizeIndividualCalls()
877 FindDependencies(NeedsPositiveRetainCount, Arg, in OptimizeIndividualCalls()
883 FindDependencies(AutoreleasePoolBoundary, Arg, in OptimizeIndividualCalls()
1022 const Value *Arg = I->first; in CheckForCFGHazards() local
1036 const BottomUpPtrState &SuccS = BBI->second.getPtrBottomUpState(Arg); in CheckForCFGHazards()
1100 const Value *Arg = nullptr; in VisitInstructionBottomUp() local
1106 Arg = GetArgRCIdentityRoot(Inst); in VisitInstructionBottomUp()
1108 BottomUpPtrState &S = MyStates.getPtrBottomUpState(Arg); in VisitInstructionBottomUp()
1119 Arg = GetArgRCIdentityRoot(Inst); in VisitInstructionBottomUp()
1120 BottomUpPtrState &S = MyStates.getPtrBottomUpState(Arg); in VisitInstructionBottomUp()
1174 if (Ptr == Arg) in VisitInstructionBottomUp()
1251 const Value *Arg = nullptr; in VisitInstructionTopDown() local
1264 Arg = GetArgRCIdentityRoot(Inst); in VisitInstructionTopDown()
1265 TopDownPtrState &S = MyStates.getPtrTopDownState(Arg); in VisitInstructionTopDown()
1272 Arg = GetArgRCIdentityRoot(Inst); in VisitInstructionTopDown()
1273 TopDownPtrState &S = MyStates.getPtrTopDownState(Arg); in VisitInstructionTopDown()
1303 if (Ptr == Arg) in VisitInstructionTopDown()
1476 void ObjCARCOpt::MoveCalls(Value *Arg, RRInfo &RetainsToMove, in MoveCalls() argument
1482 Type *ArgTy = Arg->getType(); in MoveCalls()
1489 Value *MyArg = ArgTy == ParamTy ? Arg : in MoveCalls()
1490 new BitCastInst(Arg, ParamTy, "", InsertPt); in MoveCalls()
1500 Value *MyArg = ArgTy == ParamTy ? Arg : in MoveCalls()
1501 new BitCastInst(Arg, ParamTy, "", InsertPt); in MoveCalls()
1536 RRInfo &ReleasesToMove, Value *Arg, bool KnownSafe, in PairUpRetainsAndReleases() argument
1759 Value *Arg = GetArgRCIdentityRoot(Retain); in PerformCodePlacement() local
1764 bool KnownSafe = isa<Constant>(Arg) || isa<AllocaInst>(Arg); in PerformCodePlacement()
1768 if (const LoadInst *LI = dyn_cast<LoadInst>(Arg)) in PerformCodePlacement()
1780 RetainsToMove, ReleasesToMove, Arg, KnownSafe, in PerformCodePlacement()
1786 MoveCalls(Arg, RetainsToMove, ReleasesToMove, in PerformCodePlacement()
1846 Value *Arg = Call->getArgOperand(0); in OptimizeWeakCalls() local
1848 switch (PA.getAA()->alias(Arg, EarlierArg)) { in OptimizeWeakCalls()
1875 Value *Arg = Call->getArgOperand(0); in OptimizeWeakCalls() local
1877 switch (PA.getAA()->alias(Arg, EarlierArg)) { in OptimizeWeakCalls()
1926 Value *Arg = Call->getArgOperand(0); in OptimizeWeakCalls() local
1927 if (AllocaInst *Alloca = dyn_cast<AllocaInst>(Arg)) { in OptimizeWeakCalls()
1994 HasSafePathToPredecessorCall(const Value *Arg, Instruction *Retain, in HasSafePathToPredecessorCall() argument
1998 FindDependencies(CanChangeRetainCount, Arg, Retain->getParent(), Retain, in HasSafePathToPredecessorCall()
2006 if (!Call || Arg != Call) in HasSafePathToPredecessorCall()
2021 FindPredecessorRetainWithSafePath(const Value *Arg, BasicBlock *BB, in FindPredecessorRetainWithSafePath() argument
2026 FindDependencies(CanChangeRetainCount, Arg, in FindPredecessorRetainWithSafePath()
2035 GetArgRCIdentityRoot(Retain) != Arg) { in FindPredecessorRetainWithSafePath()
2046 FindPredecessorAutoreleaseWithSafePath(const Value *Arg, BasicBlock *BB, in FindPredecessorAutoreleaseWithSafePath() argument
2051 FindDependencies(NeedsPositiveRetainCount, Arg, in FindPredecessorAutoreleaseWithSafePath()
2062 if (GetArgRCIdentityRoot(Autorelease) != Arg) in FindPredecessorAutoreleaseWithSafePath()
2093 const Value *Arg = GetRCIdentityRoot(Ret->getOperand(0)); in OptimizeReturns() local
2099 FindPredecessorAutoreleaseWithSafePath(Arg, BB, Ret, in OptimizeReturns()
2109 FindPredecessorRetainWithSafePath(Arg, BB, Autorelease, in OptimizeReturns()
2119 bool HasSafePathToCall = HasSafePathToPredecessorCall(Arg, Retain, in OptimizeReturns()