Lines Matching refs:Inst
203 static MemoryLocation getLocForWrite(Instruction *Inst, AliasAnalysis &AA) {
204 if (StoreInst *SI = dyn_cast<StoreInst>(Inst))
207 if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(Inst)) {
213 IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst);
233 static MemoryLocation getLocForRead(Instruction *Inst,
235 assert(hasMemoryWrite(Inst, TLI) && "Unknown instruction case");
239 if (MemTransferInst *MTI = dyn_cast<MemTransferInst>(Inst))
436 /// isPossibleSelfRead - If 'Inst' might be a self read (i.e. a noop copy of a
449 static bool isPossibleSelfRead(Instruction *Inst,
456 MemoryLocation InstReadLoc = getLocForRead(Inst, TLI);
462 // Okay, 'Inst' may copy over itself. However, we can still remove a the
464 // as Inst. This handles useful cases like:
491 Instruction *Inst = &*BBI++;
494 if (CallInst *F = isFreeCall(Inst, TLI)) {
500 if (!hasMemoryWrite(Inst, *TLI))
505 if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
547 << *Inst << "\n OBJECT: " << *UnderlyingPointer << '\n');
555 MemDepResult InstDep = MD->getDependency(Inst);
563 MemoryLocation Loc = getLocForWrite(Inst, *AA);
585 // 'Inst' doesn't load from, then we can remove it.
587 !isPossibleSelfRead(Inst, Loc, DepWrite, *TLI, *AA)) {
593 << *DepWrite << "\n KILLER: " << *Inst << '\n');
602 BBI = Inst->getIterator();
622 << *Inst << '\n');
771 // Inst's old Dependency is now deleted. Compute the next dependency,
861 Instruction *Inst = &*BBI++;
862 DeleteDeadInstruction(Inst, *MD, *TLI, &DeadStackObjects);