Lines Matching defs:Inst
192 getLocForWrite(Instruction *Inst, AliasAnalysis &AA) {
193 if (StoreInst *SI = dyn_cast<StoreInst>(Inst))
196 if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(Inst)) {
207 IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst);
231 getLocForRead(Instruction *Inst, AliasAnalysis &AA) {
232 assert(hasMemoryWrite(Inst, AA.getTargetLibraryInfo()) &&
237 if (MemTransferInst *MTI = dyn_cast<MemTransferInst>(Inst))
444 /// isPossibleSelfRead - If 'Inst' might be a self read (i.e. a noop copy of a
457 static bool isPossibleSelfRead(Instruction *Inst,
462 AliasAnalysis::Location InstReadLoc = getLocForRead(Inst, AA);
468 // Okay, 'Inst' may copy over itself. However, we can still remove a the
470 // as Inst. This handles useful cases like:
496 Instruction *Inst = BBI++;
499 if (CallInst *F = isFreeCall(Inst, TLI)) {
505 if (!hasMemoryWrite(Inst, TLI))
508 MemDepResult InstDep = MD->getDependency(Inst);
517 if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
542 AliasAnalysis::Location Loc = getLocForWrite(Inst, *AA);
564 // 'Inst' doesn't load from, then we can remove it.
566 !isPossibleSelfRead(Inst, Loc, DepWrite, *AA)) {
572 << *DepWrite << "\n KILLER: " << *Inst << '\n');
581 BBI = Inst;
601 << *Inst << '\n');
689 // Inst's old Dependency is now deleted. Compute the next dependency,
794 Instruction *Inst = BBI++;
795 DeleteDeadInstruction(Inst, *MD, TLI, &DeadStackObjects);