Lines Matching defs:DeadI
235 /// overwrite \p DeadI.
237 const Instruction *DeadI,
240 const auto *DeadII = dyn_cast<IntrinsicInst>(DeadI);
282 Instruction *DeadI,
296 auto &IM = IOL[DeadI];
561 static bool tryToShorten(Instruction *DeadI, int64_t &DeadStart,
564 auto *DeadIntrinsic = cast<AnyMemIntrinsic>(DeadI);
615 if (auto *AMI = dyn_cast<AtomicMemIntrinsic>(DeadI)) {
624 << (IsOverwriteEnd ? "END" : "BEGIN") << ": " << *DeadI
639 DeadI->getIterator());
645 shortenAssignment(DeadI, OrigDest, DeadStart * 8, DeadSize * 8, NewSize * 8,
656 static bool tryToShortenEnd(Instruction *DeadI, OverlapIntervalsTy &IntervalMap,
658 if (IntervalMap.empty() || !isShortenableAtTheEnd(DeadI))
674 if (tryToShorten(DeadI, DeadStart, DeadSize, KillingStart, KillingSize,
683 static bool tryToShortenBegin(Instruction *DeadI,
686 if (IntervalMap.empty() || !isShortenableAtTheBeginning(DeadI))
703 if (tryToShorten(DeadI, DeadStart, DeadSize, KillingStart, KillingSize,
713 tryToMergePartialOverlappingStores(StoreInst *KillingI, StoreInst *DeadI,
718 if (DeadI && isa<ConstantInt>(DeadI->getValueOperand()) &&
719 DL.typeSizeEqualsStoreSize(DeadI->getValueOperand()->getType()) &&
722 memoryIsNotModifiedBetween(DeadI, KillingI, AA, DL, DT)) {
733 APInt DeadValue = cast<ConstantInt>(DeadI->getValueOperand())->getValue();
750 LLVM_DEBUG(dbgs() << "DSE: Merge Stores:\n Dead: " << *DeadI
753 return ConstantInt::get(DeadI->getValueOperand()->getType(), Merged);
938 /// location (by \p DeadI instruction).
940 /// \p DeadI, but they both write to the same underlying object. In that
942 /// \p DeadI. Returns 'OR_None' if \p KillingI is known to not overwrite the
943 /// \p DeadI. Returns 'OW_Unknown' if nothing can be determined.
945 const Instruction *DeadI,
952 if (!isGuaranteedLoopIndependent(DeadI, KillingI, DeadLoc))
978 const auto *DeadMemI = dyn_cast<MemIntrinsic>(DeadI);
988 return isMaskedStoreOverwrite(KillingI, DeadI, BatchAA);
1759 // Check for any extra throws between \p KillingI and \p DeadI that block
1763 bool mayThrowBetween(Instruction *KillingI, Instruction *DeadI,
1771 if (KillingI->getParent() == DeadI->getParent())
1776 // Check if \p DeadI acts as a DSE barrier for \p KillingI. The following
1781 bool isDSEBarrier(const Value *KillingUndObj, Instruction *DeadI) {
1782 // If DeadI may throw it acts as a barrier, unless we are to an
1784 if (DeadI->mayThrow() && !isInvisibleToCallerOnUnwind(KillingUndObj))
1787 // If DeadI is an atomic load/store stronger than monotonic, do not try to
1789 if (DeadI->isAtomic()) {
1790 if (auto *LI = dyn_cast<LoadInst>(DeadI))
1792 if (auto *SI = dyn_cast<StoreInst>(DeadI))
1794 if (auto *ARMW = dyn_cast<AtomicRMWInst>(DeadI))
1796 if (auto *CmpXchg = dyn_cast<AtomicCmpXchgInst>(DeadI))
2060 Instruction *DeadI = OI.first;
2061 MemoryLocation Loc = *getLocForWrite(DeadI);
2062 assert(isRemovable(DeadI) && "Expect only removable instruction");
2069 Changed |= tryToShortenEnd(DeadI, IntervalMap, DeadStart, DeadSize);
2072 Changed |= tryToShortenBegin(DeadI, IntervalMap, DeadStart, DeadSize);
2218 Instruction *DeadI = DeadDefAccess->getMemoryInst();
2219 LLVM_DEBUG(dbgs() << " (" << *DeadI << ")\n");
2226 MemoryLocation DeadLoc = *State.getLocForWrite(DeadI);
2232 LLVM_DEBUG(dbgs() << "DSE: Remove Dead Store:\n DEAD: " << *DeadI
2234 State.deleteDeadInstruction(DeadI, &Deleted);
2238 // Check if DeadI overwrites KillingI.
2242 KillingI, DeadI, KillingLoc, DeadLoc, KillingOffset, DeadOffset);
2246 DeadI->getParent(), InstOverlapIntervalsTy()));
2249 DeadOffset, DeadI, IOL);
2253 auto *DeadSI = dyn_cast<StoreInst>(DeadI);
2281 LLVM_DEBUG(dbgs() << "DSE: Remove Dead Store:\n DEAD: " << *DeadI
2283 State.deleteDeadInstruction(DeadI, &Deleted);