• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/Target/AArch64/

Lines Matching defs:AI

281     AllocaInst *AI;
302 bool isInterestingAlloca(const AllocaInst &AI);
305 void tagAlloca(AllocaInst *AI, Instruction *InsertBefore, Value *Ptr,
307 void untagAlloca(AllocaInst *AI, Instruction *InsertBefore, uint64_t Size);
410 bool AArch64StackTagging::isInterestingAlloca(const AllocaInst &AI) {
413 AI.getAllocatedType()->isSized() && AI.isStaticAlloca() &&
415 AI.getAllocationSizeInBits(*DL).getValue() > 0 &&
418 !AI.isUsedWithInAlloca() &&
420 !AI.isSwiftError() &&
422 !(SSI && SSI->isSafe(AI));
426 void AArch64StackTagging::tagAlloca(AllocaInst *AI, Instruction *InsertBefore,
435 Triple(AI->getModule()->getTargetTriple()).isLittleEndian();
438 LLVM_DEBUG(dbgs() << "collecting initializers for " << *AI
447 void AArch64StackTagging::untagAlloca(AllocaInst *AI, Instruction *InsertBefore,
450 IRB.CreateCall(SetTagFunc, {IRB.CreatePointerCast(AI, IRB.getInt8PtrTy()),
461 AllocaInst *AI = Info.AI;
465 PrologueBB = AI->getParent();
468 PrologueBB = DT->findNearestCommonDominator(PrologueBB, AI->getParent());
483 max(MaybeAlign(Info.AI->getAlignment()), kTagGranuleSize);
484 Info.AI->setAlignment(NewAlignment);
486 uint64_t Size = Info.AI->getAllocationSizeInBits(*DL).getValue() / 8;
493 Info.AI->isArrayAllocation()
495 Info.AI->getAllocatedType(),
496 cast<ConstantInt>(Info.AI->getArraySize())->getZExtValue())
497 : Info.AI->getAllocatedType();
502 TypeWithPadding, Info.AI->getType()->getAddressSpace(), nullptr, "", Info.AI);
503 NewAI->takeName(Info.AI);
504 NewAI->setAlignment(Info.AI->getAlign());
505 NewAI->setUsedWithInAlloca(Info.AI->isUsedWithInAlloca());
506 NewAI->setSwiftError(Info.AI->isSwiftError());
507 NewAI->copyMetadata(*Info.AI);
509 auto *NewPtr = new BitCastInst(NewAI, Info.AI->getType(), "", Info.AI);
510 Info.AI->replaceAllUsesWith(NewPtr);
511 Info.AI->eraseFromParent();
512 Info.AI = NewAI;
553 if (auto *AI = dyn_cast<AllocaInst>(I)) {
554 Allocas[AI].AI = AI;
559 if (auto *AI =
561 Allocas[AI].DbgVariableIntrinsics.push_back(DVI);
569 AllocaInst *AI =
571 if (!AI) {
576 Allocas[AI].LifetimeStart.push_back(II);
578 Allocas[AI].LifetimeEnd.push_back(II);
593 assert(Info.AI);
595 if (!isInterestingAlloca(*Info.AI)) {
637 AllocaInst *AI = Info.AI;
642 IRBuilder<> IRB(Info.AI->getNextNode());
644 F->getParent(), Intrinsic::aarch64_tagp, {Info.AI->getType()});
646 IRB.CreateCall(TagP, {Constant::getNullValue(Info.AI->getType()), Base,
648 if (Info.AI->hasName())
649 TagPCall->setName(Info.AI->getName() + ".tag");
650 Info.AI->replaceAllUsesWith(TagPCall);
651 TagPCall->setOperand(0, Info.AI);
660 tagAlloca(AI, Start->getNextNode(), Start->getArgOperand(1), Size);
664 untagAlloca(AI, End, Size);
678 untagAlloca(AI, End, Size);
681 untagAlloca(AI, RI, Size);
688 uint64_t Size = Info.AI->getAllocationSizeInBits(*DL).getValue() / 8;
690 tagAlloca(AI, &*IRB.GetInsertPoint(), Ptr, Size);
692 untagAlloca(AI, RI, Size);
706 MetadataAsValue::get(F->getContext(), LocalAsMetadata::get(Info.AI)));