Lines Matching defs:DeadI
240 /// overwrite \p DeadI.
242 const Instruction *DeadI,
245 const auto *DeadII = dyn_cast<IntrinsicInst>(DeadI);
287 Instruction *DeadI,
301 auto &IM = IOL[DeadI];
566 static bool tryToShorten(Instruction *DeadI, int64_t &DeadStart,
569 auto *DeadIntrinsic = cast<AnyMemIntrinsic>(DeadI);
620 if (auto *AMI = dyn_cast<AtomicMemIntrinsic>(DeadI)) {
629 << (IsOverwriteEnd ? "END" : "BEGIN") << ": " << *DeadI
644 DeadI->getIterator());
650 shortenAssignment(DeadI, OrigDest, DeadStart * 8, DeadSize * 8, NewSize * 8,
661 static bool tryToShortenEnd(Instruction *DeadI, OverlapIntervalsTy &IntervalMap,
663 if (IntervalMap.empty() || !isShortenableAtTheEnd(DeadI))
679 if (tryToShorten(DeadI, DeadStart, DeadSize, KillingStart, KillingSize,
688 static bool tryToShortenBegin(Instruction *DeadI,
691 if (IntervalMap.empty() || !isShortenableAtTheBeginning(DeadI))
708 if (tryToShorten(DeadI, DeadStart, DeadSize, KillingStart, KillingSize,
718 tryToMergePartialOverlappingStores(StoreInst *KillingI, StoreInst *DeadI,
723 if (DeadI && isa<ConstantInt>(DeadI->getValueOperand()) &&
724 DL.typeSizeEqualsStoreSize(DeadI->getValueOperand()->getType()) &&
727 memoryIsNotModifiedBetween(DeadI, KillingI, AA, DL, DT)) {
738 APInt DeadValue = cast<ConstantInt>(DeadI->getValueOperand())->getValue();
755 LLVM_DEBUG(dbgs() << "DSE: Merge Stores:\n Dead: " << *DeadI
758 return ConstantInt::get(DeadI->getValueOperand()->getType(), Merged);
1013 /// location (by \p DeadI instruction).
1015 /// \p DeadI, but they both write to the same underlying object. In that
1017 /// \p DeadI. Returns 'OR_None' if \p KillingI is known to not overwrite the
1018 /// \p DeadI. Returns 'OW_Unknown' if nothing can be determined.
1020 const Instruction *DeadI,
1027 if (!isGuaranteedLoopIndependent(DeadI, KillingI, DeadLoc))
1053 const auto *DeadMemI = dyn_cast<MemIntrinsic>(DeadI);
1063 return isMaskedStoreOverwrite(KillingI, DeadI, BatchAA);
1866 // Check for any extra throws between \p KillingI and \p DeadI that block
1870 bool mayThrowBetween(Instruction *KillingI, Instruction *DeadI,
1878 if (KillingI->getParent() == DeadI->getParent())
1883 // Check if \p DeadI acts as a DSE barrier for \p KillingI. The following
1888 bool isDSEBarrier(const Value *KillingUndObj, Instruction *DeadI) {
1889 // If DeadI may throw it acts as a barrier, unless we are to an
1891 if (DeadI->mayThrow() && !isInvisibleToCallerOnUnwind(KillingUndObj))
1894 // If DeadI is an atomic load/store stronger than monotonic, do not try to
1896 if (DeadI->isAtomic()) {
1897 if (auto *LI = dyn_cast<LoadInst>(DeadI))
1899 if (auto *SI = dyn_cast<StoreInst>(DeadI))
1901 if (auto *ARMW = dyn_cast<AtomicRMWInst>(DeadI))
1903 if (auto *CmpXchg = dyn_cast<AtomicCmpXchgInst>(DeadI))
2168 Instruction *DeadI = OI.first;
2169 MemoryLocation Loc = *getLocForWrite(DeadI);
2170 assert(isRemovable(DeadI) && "Expect only removable instruction");
2177 Changed |= tryToShortenEnd(DeadI, IntervalMap, DeadStart, DeadSize);
2180 Changed |= tryToShortenBegin(DeadI, IntervalMap, DeadStart, DeadSize);
2429 // Check if DeadI overwrites KillingI.