Home | History | Annotate | Download | only in ObjCARC

Lines Matching refs:Store

199   StoreInst *Store = nullptr;
205 // Walk down to find the store and the release, which may be in either order.
209 // If we found the store we were looking for and saw the release,
211 if (Store && SawRelease)
214 // Now we know that we have not seen either the store or the release. If I
222 // Otherwise, we check if Inst is a "good" store. Grab the instruction class
233 // If we have seen the store, but not the release...
234 if (Store) {
236 // current position to the store. This implies proving that any
237 // instruction in between Store and the Release conservatively can not use
248 // Ok, now we know we have not seen a store yet. See if Inst can write to
253 Store = dyn_cast<StoreInst>(Inst);
255 // If Inst can, then check if Inst is a simple store. If Inst is not a
256 // store or a store that is not simple, then we have some we do not
258 // over the write to any subsequent store that we may find.
259 if (!Store || !Store->isSimple())
263 // found our Store!
264 if (Store->getPointerOperand() == Loc.Ptr)
267 // Otherwise, we have an unknown store to some other ptr that clobbers
272 // If we did not find the store or did not see the release, fail.
273 if (!Store || !SawRelease)
277 return Store;
281 findRetainForStoreStrongContraction(Value *New, StoreInst *Store,
284 // Walk up from the Store to find the retain.
285 BasicBlock::iterator I = Store->getIterator();
286 BasicBlock::iterator Begin = Store->getParent()->begin();
290 // It is only safe to move the retain to the store if we can prove
292 // counts in between the retain and the store.
305 /// Attempt to merge an objc_release with a store, load, and objc_retain to form
321 /// ; Store the new_value into old_ptr
322 /// store i8* %new_value, i8** %old_ptr (4)
327 /// 1. We are forming the store strong at the store. Thus to perform this
344 // First scan down the BB from Load, looking for a store of the RCIdentityRoot
346 StoreInst *Store =
349 if (!Store)
353 Value *New = GetRCIdentityRoot(Store->getValueOperand());
358 findRetainForStoreStrongContraction(New, Store, Release, PA);
370 << " Store: " << *Store << "\n"
381 Args[0] = new BitCastInst(Args[0], I8XX, "", Store);
383 Args[1] = new BitCastInst(Args[1], I8X, "", Store);
385 CallInst *StoreStrong = CallInst::Create(Decl, Args, "", Store);
387 StoreStrong->setDebugLoc(Store->getDebugLoc());
394 DEBUG(llvm::dbgs() << " New Store Strong: " << *StoreStrong << "\n");
396 if (&*Iter == Store) ++Iter;
397 Store->eraseFromParent();
481 // Try to form an objc store strong from our release. If we fail, there is