| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
| H A D | MemoryTaggingSupport.cpp | 119 if (auto *AI = dyn_cast_or_null<AllocaInst>(V)) { in visit() local 120 if (getAllocaInterestingness(*AI) != in visit() 123 AllocaInfo &AInfo = Info.AllocasToInstrument[AI]; in visit() 140 if (AllocaInst *AI = dyn_cast<AllocaInst>(&Inst)) { in visit() local 141 switch (getAllocaInterestingness(*AI)) { in visit() 143 Info.AllocasToInstrument[AI].AI = AI; in visit() 158 AllocaInst *AI = findAllocaForValue(II->getArgOperand(1)); in visit() local 159 if (!AI) { in visit() 163 if (getAllocaInterestingness(*AI) != AllocaInterestingness::kInteresting) in visit() 166 Info.AllocasToInstrument[AI].LifetimeStart.push_back(II); in visit() [all …]
|
| H A D | PromoteMemoryToRegister.cpp | 66 bool llvm::isAllocaPromotable(const AllocaInst *AI) { in isAllocaPromotable() argument 68 for (const User *U : AI->users()) { in isAllocaPromotable() 72 if (LI->isVolatile() || LI->getType() != AI->getAllocatedType()) in isAllocaPromotable() 75 if (SI->getValueOperand() == AI || in isAllocaPromotable() 76 SI->getValueOperand()->getType() != AI->getAllocatedType()) in isAllocaPromotable() 135 void init(AllocaInst *AI) { in init() argument 137 for (DbgAssignIntrinsic *DAI : at::getAssignmentMarkers(AI)) { in init() 141 for (DbgVariableRecord *DVR : at::getDVRAssignmentMarkers(AI)) { in init() 243 void AnalyzeAlloca(AllocaInst *AI) { in AnalyzeAlloca() 249 for (User *U : AI->users()) { in AnalyzeAlloca() [all …]
|
| /freebsd/contrib/llvm-project/clang/include/clang/CodeGen/ |
| H A D | CGFunctionInfo.h | 146 auto AI = ABIArgInfo(Direct); variable 147 AI.setCoerceToType(T); 148 AI.setPaddingType(Padding); 149 AI.setDirectOffset(Offset); 150 AI.setDirectAlign(Align); 151 AI.setCanBeFlattened(CanBeFlattened); 152 return AI; 155 auto AI = getDirect(T); variable 156 AI.setInReg(true); 157 return AI; [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/ |
| H A D | WebAssemblyRefTypeMem2Local.cpp | 46 void visitAllocaInst(AllocaInst &AI); 59 void WebAssemblyRefTypeMem2Local::visitAllocaInst(AllocaInst &AI) { in visitAllocaInst() argument 60 if (WebAssembly::isWebAssemblyReferenceType(AI.getAllocatedType())) { in visitAllocaInst() 62 IRBuilder<> IRB(AI.getContext()); in visitAllocaInst() 63 IRB.SetInsertPoint(&AI); in visitAllocaInst() 64 auto *NewAI = IRB.CreateAlloca(AI.getAllocatedType(), in visitAllocaInst() 66 AI.getName() + ".var"); in visitAllocaInst() 71 if (AI.hasValueHandle()) in visitAllocaInst() 72 ValueHandleBase::ValueIsRAUWd(&AI, NewAI); in visitAllocaInst() 73 if (AI.isUsedByMetadata()) in visitAllocaInst() [all …]
|
| H A D | WebAssemblyFixFunctionBitcasts.cpp | 120 Function::arg_iterator AI = Wrapper->arg_begin(); in createWrapper() local 135 for (; AI != AE && PI != PE; ++AI, ++PI) { in createWrapper() 136 Type *ArgType = AI->getType(); in createWrapper() 140 Args.push_back(&*AI); in createWrapper() 144 CastInst::CreateBitOrPointerCast(AI, ParamType, "cast"); in createWrapper() 166 for (; AI != AE; ++AI) in createWrapper() 167 Args.push_back(&*AI); in createWrapper()
|
| /freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
| H A D | StackProtector.cpp | 93 const AllocaInst *AI = MFI.getObjectAllocation(I); in copyToMachineFrameInfo() local 94 if (!AI) in copyToMachineFrameInfo() 97 SSPLayoutMap::const_iterator LI = Layout.find(AI); in copyToMachineFrameInfo() 267 static bool HasAddressTaken(const Instruction *AI, TypeSize AllocSize, in HasAddressTaken() argument 271 for (const User *U : AI->users()) { in HasAddressTaken() 281 if (AI == cast<StoreInst>(I)->getValueOperand()) in HasAddressTaken() 287 if (AI == cast<AtomicCmpXchgInst>(I)->getNewValOperand()) in HasAddressTaken() 291 if (AI == cast<AtomicRMWInst>(I)->getValOperand()) in HasAddressTaken() 295 if (AI == cast<PtrToIntInst>(I)->getOperand(0)) in HasAddressTaken() 434 if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) { in requiresStackProtector() local [all …]
|
| H A D | AtomicExpandPass.cpp | 88 bool tryExpandAtomicRMW(AtomicRMWInst *AI); 100 AtomicRMWInst *widenPartwordAtomicRMW(AtomicRMWInst *AI); 102 void expandAtomicRMWToMaskedIntrinsic(AtomicRMWInst *AI); 128 llvm::expandAtomicRMWToCmpXchg(AtomicRMWInst *AI, 636 AtomicRMWInst *AI = Builder.CreateAtomicRMW( in expandAtomicStore() local 642 tryExpandAtomicRMW(AI); in expandAtomicStore() 674 bool AtomicExpandImpl::tryExpandAtomicRMW(AtomicRMWInst *AI) { in tryExpandAtomicRMW() argument 675 LLVMContext &Ctx = AI->getModule()->getContext(); in tryExpandAtomicRMW() 676 TargetLowering::AtomicExpansionKind Kind = TLI->shouldExpandAtomicRMWInIR(AI); in tryExpandAtomicRMW() 682 unsigned ValueSize = getAtomicOpSize(AI); in tryExpandAtomicRMW() [all …]
|
| H A D | SafeStack.cpp | 150 uint64_t getStaticAllocaAllocationSize(const AllocaInst* AI); 205 uint64_t SafeStack::getStaticAllocaAllocationSize(const AllocaInst* AI) { in getStaticAllocaAllocationSize() argument 206 uint64_t Size = DL.getTypeAllocSize(AI->getAllocatedType()); in getStaticAllocaAllocationSize() 207 if (AI->isArrayAllocation()) { in getStaticAllocaAllocationSize() 208 auto C = dyn_cast<ConstantInt>(AI->getArraySize()); in getStaticAllocaAllocationSize() 383 if (auto AI = dyn_cast<AllocaInst>(&I)) { in findInsts() local 386 uint64_t Size = getStaticAllocaAllocationSize(AI); in findInsts() 387 if (IsSafeStackAlloca(AI, Size)) in findInsts() 390 if (AI->isStaticAlloca()) { in findInsts() 392 StaticAllocas.push_back(AI); in findInsts() [all …]
|
| H A D | RegUsageInfoCollector.cpp | 175 for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) in run() local 176 SetRegAsDefined(*AI); in run() 188 for (MCRegAliasIterator AI(PReg, TRI, true); AI.isValid(); ++AI) in run() local 189 if (!SavedRegs.test((*AI).id())) in run() 190 SetRegAsDefined(*AI); in run()
|
| H A D | AggressiveAntiDepBreaker.cpp | 156 for (MCRegAliasIterator AI(LI.PhysReg, TRI, true); AI.isValid(); ++AI) { in StartBlock() local 157 unsigned Reg = *AI; in StartBlock() 174 for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) { in StartBlock() local 175 MCRegister AliasReg = *AI; in StartBlock() 303 for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) in HandleLastUse() local 304 if (TRI->isSuperRegister(Reg, *AI) && State->IsLive(*AI)) { in HandleLastUse() 386 for (MCRegAliasIterator AI(Reg, TRI, false); AI.isValid(); ++AI) { in PrescanInstruction() local 387 MCRegister AliasReg = *AI; in PrescanInstruction() 416 for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) { in PrescanInstruction() local 423 if (TRI->isSuperRegister(Reg, *AI) && State->IsLive(*AI)) in PrescanInstruction() [all …]
|
| H A D | RDFRegisters.cpp | 120 for (MCRegAliasIterator AI(Reg, &TRI, false); AI.isValid(); ++AI) in getAliasSet() local 121 AS.insert(*AI); in getAliasSet() 190 MCRegUnitMaskIterator AI(A.Reg, &getTRI()); in equal_to() local 192 while (AI.isValid() && BI.isValid()) { in equal_to() 193 auto [AReg, AMask] = *AI; in equal_to() 202 ++AI; in equal_to() 208 ++AI; in equal_to() 213 return static_cast<int>(AI.isValid()) == static_cast<int>(BI.isValid()); in equal_to() 228 llvm::MCRegUnitMaskIterator AI(A.Reg, &getTRI()); in less() local 230 while (AI.isValid() && BI.isValid()) { in less() [all …]
|
| H A D | CriticalAntiDepBreaker.cpp | 69 for (MCRegAliasIterator AI(LI.PhysReg, TRI, true); AI.isValid(); ++AI) { in StartBlock() local 70 MCRegister Reg = *AI; in StartBlock() 87 for (MCRegAliasIterator AI(*I, TRI, true); AI.isValid(); ++AI) { in StartBlock() local 88 MCRegister Reg = *AI; in StartBlock() 200 for (MCRegAliasIterator AI(Reg, TRI, false); AI.isValid(); ++AI) { in PrescanInstruction() local 204 unsigned AliasReg = (*AI).id(); in PrescanInstruction() 332 for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) { in ScanInstruction() local 333 MCRegister AliasReg = *AI; in ScanInstruction()
|
| H A D | CallingConvLower.cpp | 63 for (MCRegAliasIterator AI(Reg, &TRI, true); AI.isValid(); ++AI) in MarkAllocated() local 64 UsedRegs[(*AI).id() / 32] |= 1 << ((*AI).id() & 31); in MarkAllocated() 68 for (MCRegAliasIterator AI(Reg, &TRI, true); AI.isValid(); ++AI) in MarkUnallocated() local 69 UsedRegs[(*AI).id() / 32] &= ~(1 << ((*AI).id() & 31)); in MarkUnallocated()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
| H A D | AMDGPUArgumentUsageInfo.cpp | 155 AMDGPUFunctionArgInfo AI; in fixedABILayout() local 156 AI.PrivateSegmentBuffer in fixedABILayout() 158 AI.DispatchPtr = ArgDescriptor::createRegister(AMDGPU::SGPR4_SGPR5); in fixedABILayout() 159 AI.QueuePtr = ArgDescriptor::createRegister(AMDGPU::SGPR6_SGPR7); in fixedABILayout() 163 AI.ImplicitArgPtr = ArgDescriptor::createRegister(AMDGPU::SGPR8_SGPR9); in fixedABILayout() 164 AI.DispatchID = ArgDescriptor::createRegister(AMDGPU::SGPR10_SGPR11); in fixedABILayout() 167 AI.WorkGroupIDX = ArgDescriptor::createRegister(AMDGPU::SGPR12); in fixedABILayout() 168 AI.WorkGroupIDY = ArgDescriptor::createRegister(AMDGPU::SGPR13); in fixedABILayout() 169 AI.WorkGroupIDZ = ArgDescriptor::createRegister(AMDGPU::SGPR14); in fixedABILayout() 170 AI.LDSKernelId = ArgDescriptor::createRegister(AMDGPU::SGPR15); in fixedABILayout() [all …]
|
| H A D | SIMachineFunctionInfo.cpp | 653 yaml::SIArgumentInfo AI; in convertArgumentInfo() local 677 Any |= convertArg(AI.PrivateSegmentBuffer, ArgInfo.PrivateSegmentBuffer); in convertArgumentInfo() 678 Any |= convertArg(AI.DispatchPtr, ArgInfo.DispatchPtr); in convertArgumentInfo() 679 Any |= convertArg(AI.QueuePtr, ArgInfo.QueuePtr); in convertArgumentInfo() 680 Any |= convertArg(AI.KernargSegmentPtr, ArgInfo.KernargSegmentPtr); in convertArgumentInfo() 681 Any |= convertArg(AI.DispatchID, ArgInfo.DispatchID); in convertArgumentInfo() 682 Any |= convertArg(AI.FlatScratchInit, ArgInfo.FlatScratchInit); in convertArgumentInfo() 683 Any |= convertArg(AI.LDSKernelId, ArgInfo.LDSKernelId); in convertArgumentInfo() 684 Any |= convertArg(AI.PrivateSegmentSize, ArgInfo.PrivateSegmentSize); in convertArgumentInfo() 685 Any |= convertArg(AI.WorkGroupIDX, ArgInfo.WorkGroupIDX); in convertArgumentInfo() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Coroutines/ |
| H A D | SpillUtils.cpp | 58 static bool isLocalAlloca(CoroAllocaAllocInst *AI) { in isLocalAlloca() argument 62 for (auto *User : AI->users()) { in isLocalAlloca() 67 return !isSuspendReachableFrom(AI->getParent(), VisitedOrFreeBBs); in isLocalAlloca() 74 lowerNonLocalAlloca(CoroAllocaAllocInst *AI, const coro::Shape &Shape, in lowerNonLocalAlloca() argument 76 IRBuilder<> Builder(AI); in lowerNonLocalAlloca() 77 auto Alloc = Shape.emitAlloc(Builder, AI->getSize(), nullptr); in lowerNonLocalAlloca() 79 for (User *U : AI->users()) { in lowerNonLocalAlloca() 91 DeadInsts.push_back(AI); in lowerNonLocalAlloca() 205 auto *AI = dyn_cast<AllocaInst>(SI.getPointerOperand()); in visitStoreInst() local 209 if (!AI) in visitStoreInst() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineLoadStoreAlloca.cpp | 165 AllocaInst *AI, in isOnlyCopiedFromConstantMemory() argument 168 if (isOnlyCopiedFromConstantMemory(AA, AI, TheCopy, ToDelete)) in isOnlyCopiedFromConstantMemory() 174 static bool isDereferenceableForAllocaSize(const Value *V, const AllocaInst *AI, in isDereferenceableForAllocaSize() argument 176 if (AI->isArrayAllocation()) in isDereferenceableForAllocaSize() 178 uint64_t AllocaSize = DL.getTypeStoreSize(AI->getAllocatedType()); in isDereferenceableForAllocaSize() 181 return isDereferenceableAndAlignedPointer(V, AI->getAlign(), in isDereferenceableForAllocaSize() 186 AllocaInst &AI, DominatorTree &DT) { in simplifyAllocaArraySize() argument 188 if (!AI.isArrayAllocation()) { in simplifyAllocaArraySize() 190 if (AI.getArraySize()->getType()->isIntegerTy(32)) in simplifyAllocaArraySize() 194 return IC.replaceOperand(AI, 0, IC.Builder.getInt32(1)); in simplifyAllocaArraySize() [all …]
|
| /freebsd/contrib/llvm-project/llvm/utils/TableGen/Common/ |
| H A D | InfoByHwMode.h | 45 auto AI = A.begin(); in union_modes() local 50 if (AI != A.end() && AI->first == DefaultMode) { in union_modes() 52 ++AI; in union_modes() 59 while (AI != A.end()) { in union_modes() 62 for (; AI != A.end(); ++AI) in union_modes() 63 Modes.push_back(AI->first); in union_modes() 67 if (BI->first < AI->first) { in union_modes() 71 Modes.push_back(AI->first); in union_modes() 72 if (AI->first == BI->first) in union_modes() 74 ++AI; in union_modes()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/ |
| H A D | AArch64StackTagging.cpp | 314 void tagAlloca(AllocaInst *AI, Instruction *InsertBefore, Value *Ptr, 316 void untagAlloca(AllocaInst *AI, Instruction *InsertBefore, uint64_t Size); 422 void AArch64StackTagging::tagAlloca(AllocaInst *AI, Instruction *InsertBefore, in tagAlloca() argument 430 bool LittleEndian = AI->getModule()->getTargetTriple().isLittleEndian(); in tagAlloca() 434 LLVM_DEBUG(dbgs() << "collecting initializers for " << *AI in tagAlloca() 443 void AArch64StackTagging::untagAlloca(AllocaInst *AI, Instruction *InsertBefore, in untagAlloca() argument 446 IRB.CreateCall(SetTagFunc, {IRB.CreatePointerCast(AI, IRB.getPtrTy()), in untagAlloca() 458 AllocaInst *AI = Info.AI; in insertBaseTaggedPointer() local 460 PrologueBB = AI->getParent(); in insertBaseTaggedPointer() 463 PrologueBB = DT->findNearestCommonDominator(PrologueBB, AI->getParent()); in insertBaseTaggedPointer() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
| H A D | StackSafetyAnalysis.cpp | 154 ConstantRange getStaticAllocaSizeRange(const AllocaInst &AI) { in getStaticAllocaSizeRange() argument 155 const DataLayout &DL = AI.getDataLayout(); in getStaticAllocaSizeRange() 156 TypeSize TS = DL.getTypeAllocSize(AI.getAllocatedType()); in getStaticAllocaSizeRange() 157 unsigned PointerSize = DL.getPointerTypeSizeInBits(AI.getType()); in getStaticAllocaSizeRange() 165 if (AI.isArrayAllocation()) { in getStaticAllocaSizeRange() 166 const auto *C = dyn_cast<ConstantInt>(AI.getArraySize()); in getStaticAllocaSizeRange() 210 if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) { in print() local 211 auto &AS = Allocas.find(AI)->second; in print() 212 O << " " << AI->getName() << "[" in print() 213 << getStaticAllocaSizeRange(*AI).getUpper() << "]: " << AS << "\n"; in print() [all …]
|
| H A D | StackLifetime.cpp | 35 StackLifetime::getLiveRange(const AllocaInst *AI) const { in getLiveRange() 36 const auto IT = AllocaNumbering.find(AI); in getLiveRange() 45 bool StackLifetime::isAliveAfter(const AllocaInst *AI, in isAliveAfter() argument 59 return getLiveRange(AI).test(InstNum); in isAliveAfter() 66 const AllocaInst *AI = findAllocaForValue(II.getArgOperand(1), true); in findMatchingAlloca() local 67 if (!AI) in findMatchingAlloca() 70 auto AllocaSize = AI->getAllocationSize(DL); in findMatchingAlloca() 82 return AI; in findMatchingAlloca() 98 const AllocaInst *AI = findMatchingAlloca(*II, DL); in collectMarkers() local 99 if (!AI) { in collectMarkers() [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/CodeGen/ |
| H A D | MacroPPCallbacks.cpp | 30 MacroInfo::param_iterator AI = MI.param_begin(), E = MI.param_end(); in writeMacroDefinition() local 31 for (; AI + 1 != E; ++AI) { in writeMacroDefinition() 32 Name << (*AI)->getName(); in writeMacroDefinition() 37 if ((*AI)->getName() == "__VA_ARGS__") in writeMacroDefinition() 40 Name << (*AI)->getName(); in writeMacroDefinition()
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/ubsan/ |
| H A D | ubsan_diag.cpp | 87 AddressInfo AI; in MaybeReportErrorSummary() local 88 AI.file = internal_strdup(SLoc.getFilename()); in MaybeReportErrorSummary() 89 AI.line = SLoc.getLine(); in MaybeReportErrorSummary() 90 AI.column = SLoc.getColumn(); in MaybeReportErrorSummary() 91 AI.function = nullptr; in MaybeReportErrorSummary() 92 ReportErrorSummary(ErrorKind, AI, GetSanititizerToolName()); in MaybeReportErrorSummary() 93 AI.Clear(); in MaybeReportErrorSummary() 97 const AddressInfo &AI = Loc.getSymbolizedStack()->info; in MaybeReportErrorSummary() local 98 ReportErrorSummary(ErrorKind, AI, GetSanititizerToolName()); in MaybeReportErrorSummary() 448 const AddressInfo &AI = Stack.get()->info; in IsPCSuppressed() local [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/Interpreter/ |
| H A D | RemoteJITUtils.cpp | 181 addrinfo *AI; in connectTCPSocketImpl() local 187 if (int EC = getaddrinfo(Host.c_str(), PortStr.c_str(), &Hints, &AI)) in connectTCPSocketImpl() 195 for (Server = AI; Server != nullptr; Server = Server->ai_next) { in connectTCPSocketImpl() 198 if ((SockFD = socket(AI->ai_family, AI->ai_socktype, AI->ai_protocol)) < 0) in connectTCPSocketImpl() 207 freeaddrinfo(AI); in connectTCPSocketImpl()
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/ |
| H A D | AddressSanitizer.cpp | 797 TypeSize getAllocaSizeInBytes(const AllocaInst &AI) const { in getAllocaSizeInBytes() 798 return *AI.getAllocationSize(AI.getDataLayout()); in getAllocaSizeInBytes() 802 bool isInterestingAlloca(const AllocaInst &AI); 1060 AllocaInst *AI; member 1187 void handleDynamicAllocaCall(AllocaInst *AI); 1190 void visitAllocaInst(AllocaInst &AI) { in visitAllocaInst() 1192 const Type *AllocaType = AI.getAllocatedType(); in visitAllocaInst() 1194 if (!ASan.isInterestingAlloca(AI) || isa<ScalableVectorType>(AllocaType) || in visitAllocaInst() 1196 if (AI.isStaticAlloca()) { in visitAllocaInst() 1202 StaticAllocasToMoveUp.push_back(&AI); in visitAllocaInst() [all …]
|