Lines Matching refs:II

499   void visitMemSetInst(MemSetInst &II) {
500 assert(II.getRawDest() == *U && "Pointer use is not the destination?");
501 ConstantInt *Length = dyn_cast<ConstantInt>(II.getLength());
505 return markAsDead(II);
508 return PI.setAborted(&II);
510 insertUse(II, Offset,
516 void visitMemTransferInst(MemTransferInst &II) {
517 ConstantInt *Length = dyn_cast<ConstantInt>(II.getLength());
520 return markAsDead(II);
524 if (VisitedDeadInsts.count(&II))
528 return PI.setAborted(&II);
536 SmallDenseMap<Instruction *, unsigned>::iterator MTPI = MemTransferSliceMap.find(&II);
539 return markAsDead(II);
548 if (*U == II.getRawDest() && *U == II.getRawSource()) {
550 if (!II.isVolatile())
551 return markAsDead(II);
553 return insertUse(II, Offset, Size, /*IsSplittable=*/false);
561 MemTransferSliceMap.insert(std::make_pair(&II, S.Slices.size()));
568 if (!II.isVolatile() && PrevP.beginOffset() == RawOffset) {
570 return markAsDead(II);
579 insertUse(II, Offset, Size, /*IsSplittable=*/Inserted && Length);
582 assert(S.Slices[PrevIdx].getUse()->getUser() == &II &&
589 void visitIntrinsicInst(IntrinsicInst &II) {
591 return PI.setAborted(&II);
593 if (II.getIntrinsicID() == Intrinsic::lifetime_start ||
594 II.getIntrinsicID() == Intrinsic::lifetime_end) {
595 ConstantInt *Length = cast<ConstantInt>(II.getArgOperand(0));
598 insertUse(II, Offset, Size, true);
602 Base::visitIntrinsicInst(II);
1787 } else if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(U->getUser())) {
1788 if (II->getIntrinsicID() != Intrinsic::lifetime_start &&
1789 II->getIntrinsicID() != Intrinsic::lifetime_end)
2388 bool visitMemSetInst(MemSetInst &II) {
2389 DEBUG(dbgs() << " original: " << II << "\n");
2390 assert(II.getRawDest() == OldPtr);
2394 if (!isa<Constant>(II.getLength())) {
2397 II.setDest(getNewAllocaSlicePtr(IRB, OldPtr->getType()));
2398 Type *CstTy = II.getAlignmentCst()->getType();
2399 II.setAlignment(ConstantInt::get(CstTy, getSliceAlign()));
2406 Pass.DeadInsts.insert(&II);
2419 Type *SizeTy = II.getLength()->getType();
2422 getNewAllocaSlicePtr(IRB, OldPtr->getType()), II.getValue(), Size,
2423 getSliceAlign(), II.isVolatile());
2447 getIntegerSplat(II.getValue(), DL.getTypeSizeInBits(ElementTy) / 8);
2458 assert(!II.isVolatile());
2461 V = getIntegerSplat(II.getValue(), Size);
2480 V = getIntegerSplat(II.getValue(), DL.getTypeSizeInBits(ScalarTy) / 8);
2488 II.isVolatile());
2491 return !II.isVolatile();
2494 bool visitMemTransferInst(MemTransferInst &II) {
2498 DEBUG(dbgs() << " original: " << II << "\n");
2500 bool IsDest = &II.getRawDestUse() == OldUse;
2501 assert((IsDest && II.getRawDest() == OldPtr) ||
2502 (!IsDest && II.getRawSource() == OldPtr));
2516 II.setDest(AdjustedPtr);
2518 II.setSource(AdjustedPtr);
2520 if (II.getAlignment() > SliceAlign) {
2521 Type *CstTy = II.getAlignmentCst()->getType();
2522 II.setAlignment(
2523 ConstantInt::get(CstTy, MinAlign(II.getAlignment(), SliceAlign)));
2526 DEBUG(dbgs() << " to: " << II << "\n");
2552 II.setLength(ConstantInt::get(II.getLength()->getType(),
2557 Pass.DeadInsts.insert(&II);
2561 Value *OtherPtr = IsDest ? II.getRawSource() : II.getRawDest();
2575 unsigned OtherAlign = MinAlign(II.getAlignment() ? II.getAlignment() : 1,
2585 Type *SizeTy = II.getLength()->getType();
2590 MinAlign(SliceAlign, OtherAlign), II.isVolatile());
2642 Src = IRB.CreateAlignedLoad(SrcPtr, SrcAlign, II.isVolatile(),
2660 IRB.CreateAlignedStore(Src, DstPtr, DstAlign, II.isVolatile()));
2663 return !II.isVolatile();
2666 bool visitIntrinsicInst(IntrinsicInst &II) {
2667 assert(II.getIntrinsicID() == Intrinsic::lifetime_start ||
2668 II.getIntrinsicID() == Intrinsic::lifetime_end);
2669 DEBUG(dbgs() << " original: " << II << "\n");
2670 assert(II.getArgOperand(1) == OldPtr);
2673 Pass.DeadInsts.insert(&II);
2676 = ConstantInt::get(cast<IntegerType>(II.getArgOperand(0)->getType()),
2680 if (II.getIntrinsicID() == Intrinsic::lifetime_start)
3570 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
3571 assert(II->getIntrinsicID() == Intrinsic::lifetime_start ||
3572 II->getIntrinsicID() == Intrinsic::lifetime_end);
3573 II->eraseFromParent();