Home | History | Annotate | Download | only in ObjCARC

Lines Matching refs:Retain

226 // The second retain and autorelease can be deleted.
252 // TODO: Delete release+retain pairs (rare).
258 "retain+autoreleases eliminated");
259 STATISTIC(NumRRs, "Number of retain+release paths eliminated");
340 /// retain-decrement-use-release sequence or release-use-decrement-retain
346 /// there are retain-release pairs in code regions where the retain count
350 /// Also, a retain+release pair nested within another retain+release
373 /// retain/release pairs.
1448 // Keep track of which of retain, release, autorelease, and retain_block
1495 // These can't be moved across things that care about the retain
1584 llvm_unreachable("bottom-up pointer in retain state!");
1613 llvm_unreachable("bottom-up pointer in retain state!");
1736 // Theoretically we could implement removal of nested retain+release
1779 // Don't do retain+release tracking for IC_RetainRV, because it's
1788 llvm_unreachable("bottom-up pointer in retain state!");
1791 // A retain moving bottom up can be a use.
1811 // one direction, will match the inner retain on the original pointer with
1814 // both our retain and our release are KnownSafe.
1855 llvm_unreachable("bottom-up pointer in retain state!");
1903 llvm_unreachable("bottom-up pointer in retain state!");
1992 // Don't do retain+release tracking for IC_RetainRV, because it's
1997 // hopefully eliminated the second retain, which may allow us to
1998 // eliminate the first retain too.
1999 // Theoretically we could implement removal of nested retain+release
2013 // A retain can be a potential use; procede to the generic checking
2261 // will be well behaved, i.e. they won't repeatedly call retain on a single
2301 // Insert the new retain and release calls.
2313 DEBUG(dbgs() << "Inserting new Retain: " << *Call << "\n"
2335 // Delete the original retain and release calls.
2342 DEBUG(dbgs() << "Deleting retain: " << *OrigRetain << "\n");
2405 // If the release does not have a reference to the retain as well,
2489 // If the retain does not have a reference to the release as well,
2541 // MultipleOwners, we can safely remove the retain/releases. Otherwise we need
2551 // balance of retain and release calls through the program.
2566 // Determine whether the original call points are balanced in the retain and
2607 // Visit each retain.
2613 Instruction *Retain = cast<Instruction>(V);
2615 DEBUG(dbgs() << "Visiting: " << *Retain << "\n");
2617 Value *Arg = GetObjCArg(Retain);
2635 NewRetains.push_back(Retain);
2649 // Clean up state for next retain.
2709 // If the load has a builtin retain, insert a plain retain for it.
2738 // If the load has a builtin retain, insert a plain retain for it.
2849 /// between the Retain and the call that can affect the reference count of their
2850 /// shared pointer argument. Note that Retain need not be in BB.
2852 HasSafePathToPredecessorCall(const Value *Arg, Instruction *Retain,
2856 FindDependencies(CanChangeRetainCount, Arg, Retain->getParent(), Retain,
2876 /// Find a dependent retain that precedes the given autorelease for which there
2890 CallInst *Retain =
2893 // Check that we found a retain with the same argument.
2894 if (!Retain ||
2895 !IsRetain(GetBasicInstructionClass(Retain)) ||
2896 GetObjCArg(Retain) != Arg) {
2900 return Retain;
2937 /// And delete the retain and autorelease.
2970 CallInst *Retain =
2976 if (!Retain)
2980 // between the retain and the call. Note that Retain need not be in BB.
2981 bool HasSafePathToCall = HasSafePathToPredecessorCall(Arg, Retain,
2990 // If so, we can zap the retain and autorelease.
2993 DEBUG(dbgs() << "Erasing: " << *Retain << "\nErasing: "
2995 EraseInstruction(Retain);
3097 // Optimizations for retain+release pairs.
3103 // no retain+release pair nesting is detected.