/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
H A D | MemoryTaggingSupport.cpp | 118 if (auto *AI = dyn_cast_or_null<AllocaInst>(V)) { in visit() local 119 if (!isInterestingAlloca(*AI)) in visit() 121 AllocaInfo &AInfo = Info.AllocasToInstrument[AI]; in visit() 138 if (AllocaInst *AI = dyn_cast<AllocaInst>(&Inst)) { in visit() local 139 if (isInterestingAlloca(*AI)) { in visit() 140 Info.AllocasToInstrument[AI].AI = AI; in visit() 147 AllocaInst *AI = findAllocaForValue(II->getArgOperand(1)); in visit() local 148 if (!AI) { in visit() 152 if (!isInterestingAlloca(*AI)) in visit() 155 Info.AllocasToInstrument[AI].LifetimeStart.push_back(II); in visit() [all …]
|
H A D | PromoteMemoryToRegister.cpp | 65 bool llvm::isAllocaPromotable(const AllocaInst *AI) { in isAllocaPromotable() argument 67 for (const User *U : AI->users()) { in isAllocaPromotable() 71 if (LI->isVolatile() || LI->getType() != AI->getAllocatedType()) in isAllocaPromotable() 74 if (SI->getValueOperand() == AI || in isAllocaPromotable() 75 SI->getValueOperand()->getType() != AI->getAllocatedType()) in isAllocaPromotable() 132 void init(AllocaInst *AI) { in init() argument 134 for (DbgAssignIntrinsic *DAI : at::getAssignmentMarkers(AI)) { in init() 138 for (DbgVariableRecord *DVR : at::getDVRAssignmentMarkers(AI)) { in init() 240 void AnalyzeAlloca(AllocaInst *AI) { in AnalyzeAlloca() 246 for (User *U : AI->users()) { in AnalyzeAlloca() [all …]
|
/freebsd/contrib/llvm-project/clang/include/clang/CodeGen/ |
H A D | CGFunctionInfo.h | 145 auto AI = ABIArgInfo(Direct); variable 146 AI.setCoerceToType(T); 147 AI.setPaddingType(Padding); 148 AI.setDirectOffset(Offset); 149 AI.setDirectAlign(Align); 150 AI.setCanBeFlattened(CanBeFlattened); 151 return AI; 154 auto AI = getDirect(T); variable 155 AI.setInReg(true); 156 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 | 119 Function::arg_iterator AI = Wrapper->arg_begin(); in createWrapper() local 134 for (; AI != AE && PI != PE; ++AI, ++PI) { in createWrapper() 135 Type *ArgType = AI->getType(); in createWrapper() 139 Args.push_back(&*AI); in createWrapper() 143 CastInst::CreateBitOrPointerCast(AI, ParamType, "cast"); in createWrapper() 165 for (; AI != AE; ++AI) in createWrapper() 166 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 runOnFunction() 94 if (!AI) in runOnFunction() 97 SSPLayoutMap::const_iterator LI = Layout.find(AI); in runOnFunction() 255 static bool HasAddressTaken(const Instruction *AI, TypeSize AllocSize, in HasAddressTaken() 259 for (const User *U : AI->users()) { in HasAddressTaken() 269 if (AI == cast<StoreInst>(I)->getValueOperand()) in findStackProtectorIntrinsic() 275 if (AI == cast<AtomicCmpXchgInst>(I)->getNewValOperand()) 279 if (AI == cast<PtrToIntInst>(I)->getOperand(0)) 411 if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) { in requiresStackProtector() 412 if (AI in requiresStackProtector() 171 HasAddressTaken(const Instruction * AI,TypeSize AllocSize,Module * M,SmallPtrSet<const PHINode *,16> & VisitedPHIs) HasAddressTaken() argument 327 if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) { requiresStackProtector() local 452 CreatePrologue(Function * F,Module * M,Instruction * CheckLoc,const TargetLoweringBase * TLI,AllocaInst * & AI) CreatePrologue() argument 477 AllocaInst *AI = nullptr; // Place on stack that stores the stack guard. InsertStackProtectors() local 650 const AllocaInst *AI = MFI.getObjectAllocation(I); copyToMachineFrameInfo() local [all...] |
H A D | AtomicExpandPass.cpp | 79 bool tryExpandAtomicRMW(AtomicRMWInst *AI); 91 AtomicRMWInst *widenPartwordAtomicRMW(AtomicRMWInst *AI); 93 void expandAtomicRMWToMaskedIntrinsic(AtomicRMWInst *AI); 119 llvm::expandAtomicRMWToCmpXchg(AtomicRMWInst *AI, 565 AtomicRMWInst *AI = Builder.CreateAtomicRMW( in expandAtomicStore() local 571 tryExpandAtomicRMW(AI); in expandAtomicStore() 599 bool AtomicExpandImpl::tryExpandAtomicRMW(AtomicRMWInst *AI) { in tryExpandAtomicRMW() argument 600 LLVMContext &Ctx = AI->getModule()->getContext(); in tryExpandAtomicRMW() 601 TargetLowering::AtomicExpansionKind Kind = TLI->shouldExpandAtomicRMWInIR(AI); in tryExpandAtomicRMW() 607 unsigned ValueSize = getAtomicOpSize(AI); in tryExpandAtomicRMW() [all …]
|
H A D | SafeStack.cpp | 151 uint64_t getStaticAllocaAllocationSize(const AllocaInst* AI); 206 uint64_t SafeStack::getStaticAllocaAllocationSize(const AllocaInst* AI) { in getStaticAllocaAllocationSize() argument 207 uint64_t Size = DL.getTypeAllocSize(AI->getAllocatedType()); in getStaticAllocaAllocationSize() 208 if (AI->isArrayAllocation()) { in getStaticAllocaAllocationSize() 209 auto C = dyn_cast<ConstantInt>(AI->getArraySize()); in getStaticAllocaAllocationSize() 384 if (auto AI = dyn_cast<AllocaInst>(&I)) { in findInsts() local 387 uint64_t Size = getStaticAllocaAllocationSize(AI); in findInsts() 388 if (IsSafeStackAlloca(AI, Size)) in findInsts() 391 if (AI->isStaticAlloca()) { in findInsts() 393 StaticAllocas.push_back(AI); in findInsts() [all …]
|
H A D | RegUsageInfoCollector.cpp | 151 for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) in runOnMachineFunction() local 152 SetRegAsDefined(*AI); in runOnMachineFunction() 164 for (MCRegAliasIterator AI(PReg, TRI, true); AI.isValid(); ++AI) in runOnMachineFunction() local 165 if (!SavedRegs.test(*AI)) in runOnMachineFunction() 166 SetRegAsDefined(*AI); in runOnMachineFunction()
|
H A D | AggressiveAntiDepBreaker.cpp | 157 for (MCRegAliasIterator AI(LI.PhysReg, TRI, true); AI.isValid(); ++AI) { in StartBlock() local 158 unsigned Reg = *AI; in StartBlock() 175 for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) { in StartBlock() local 176 unsigned AliasReg = *AI; in StartBlock() 304 for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) in HandleLastUse() local 305 if (TRI->isSuperRegister(Reg, *AI) && State->IsLive(*AI)) { in HandleLastUse() 384 for (MCRegAliasIterator AI(Reg, TRI, false); AI.isValid(); ++AI) { in PrescanInstruction() local 385 unsigned AliasReg = *AI; in PrescanInstruction() 414 for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) { in PrescanInstruction() local 421 if (TRI->isSuperRegister(Reg, *AI) && State->IsLive(*AI)) in PrescanInstruction() [all …]
|
H A D | CriticalAntiDepBreaker.cpp | 69 for (MCRegAliasIterator AI(LI.PhysReg, TRI, true); AI.isValid(); ++AI) { in StartBlock() local 70 unsigned Reg = *AI; in StartBlock() 87 for (MCRegAliasIterator AI(*I, TRI, true); AI.isValid(); ++AI) { in StartBlock() local 88 unsigned Reg = *AI; in StartBlock() 199 for (MCRegAliasIterator AI(Reg, TRI, false); AI.isValid(); ++AI) { in PrescanInstruction() local 203 unsigned AliasReg = *AI; in PrescanInstruction() 329 for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) { in ScanInstruction() local 330 unsigned AliasReg = *AI; in ScanInstruction()
|
H A D | RDFRegisters.cpp | 120 for (MCRegAliasIterator AI(Reg, &TRI, false); AI.isValid(); ++AI) in getAliasSet() 121 AS.insert(*AI); in getAliasSet() 190 MCRegUnitMaskIterator AI(A.Reg, &getTRI()); in equal_to() 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 in equal_to() 127 for (MCRegAliasIterator AI(Reg, &TRI, false); AI.isValid(); ++AI) getAliasSet() local 197 MCRegUnitMaskIterator AI(A.Reg, &getTRI()); equal_to() local 242 llvm::MCRegUnitMaskIterator AI(A.Reg, &getTRI()); less() local [all...] |
H A D | CallingConvLower.cpp | 63 for (MCRegAliasIterator AI(Reg, &TRI, true); AI.isValid(); ++AI) in MarkAllocated() local 64 UsedRegs[*AI / 32] |= 1 << (*AI & 31); in MarkAllocated() 68 for (MCRegAliasIterator AI(Reg, &TRI, true); AI.isValid(); ++AI) in MarkUnallocated() local 69 UsedRegs[*AI / 32] &= ~(1 << (*AI & 31)); in MarkUnallocated()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
H A D | AMDGPUArgumentUsageInfo.cpp | 156 AMDGPUFunctionArgInfo AI; in fixedABILayout() local 157 AI.PrivateSegmentBuffer in fixedABILayout() 159 AI.DispatchPtr = ArgDescriptor::createRegister(AMDGPU::SGPR4_SGPR5); in fixedABILayout() 160 AI.QueuePtr = ArgDescriptor::createRegister(AMDGPU::SGPR6_SGPR7); in fixedABILayout() 164 AI.ImplicitArgPtr = ArgDescriptor::createRegister(AMDGPU::SGPR8_SGPR9); in fixedABILayout() 165 AI.DispatchID = ArgDescriptor::createRegister(AMDGPU::SGPR10_SGPR11); in fixedABILayout() 168 AI.WorkGroupIDX = ArgDescriptor::createRegister(AMDGPU::SGPR12); in fixedABILayout() 169 AI.WorkGroupIDY = ArgDescriptor::createRegister(AMDGPU::SGPR13); in fixedABILayout() 170 AI.WorkGroupIDZ = ArgDescriptor::createRegister(AMDGPU::SGPR14); in fixedABILayout() 171 AI.LDSKernelId = ArgDescriptor::createRegister(AMDGPU::SGPR15); in fixedABILayout() [all …]
|
H A D | SIMachineFunctionInfo.cpp | 621 yaml::SIArgumentInfo AI; in convertArgumentInfo() local 645 Any |= convertArg(AI.PrivateSegmentBuffer, ArgInfo.PrivateSegmentBuffer); in convertArgumentInfo() 646 Any |= convertArg(AI.DispatchPtr, ArgInfo.DispatchPtr); in convertArgumentInfo() 647 Any |= convertArg(AI.QueuePtr, ArgInfo.QueuePtr); in convertArgumentInfo() 648 Any |= convertArg(AI.KernargSegmentPtr, ArgInfo.KernargSegmentPtr); in convertArgumentInfo() 649 Any |= convertArg(AI.DispatchID, ArgInfo.DispatchID); in convertArgumentInfo() 650 Any |= convertArg(AI.FlatScratchInit, ArgInfo.FlatScratchInit); in convertArgumentInfo() 651 Any |= convertArg(AI.LDSKernelId, ArgInfo.LDSKernelId); in convertArgumentInfo() 652 Any |= convertArg(AI.PrivateSegmentSize, ArgInfo.PrivateSegmentSize); in convertArgumentInfo() 653 Any |= convertArg(AI.WorkGroupIDX, ArgInfo.WorkGroupIDX); in convertArgumentInfo() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
H A D | InstCombineLoadStoreAlloca.cpp | 177 AllocaInst *AI, in isOnlyCopiedFromConstantMemory() argument 180 if (isOnlyCopiedFromConstantMemory(AA, AI, TheCopy, ToDelete)) in isOnlyCopiedFromConstantMemory() 186 static bool isDereferenceableForAllocaSize(const Value *V, const AllocaInst *AI, in isDereferenceableForAllocaSize() argument 188 if (AI->isArrayAllocation()) in isDereferenceableForAllocaSize() 190 uint64_t AllocaSize = DL.getTypeStoreSize(AI->getAllocatedType()); in isDereferenceableForAllocaSize() 193 return isDereferenceableAndAlignedPointer(V, AI->getAlign(), in isDereferenceableForAllocaSize() 198 AllocaInst &AI, DominatorTree &DT) { in simplifyAllocaArraySize() argument 200 if (!AI.isArrayAllocation()) { in simplifyAllocaArraySize() 202 if (AI.getArraySize()->getType()->isIntegerTy(32)) in simplifyAllocaArraySize() 206 return IC.replaceOperand(AI, 0, IC.Builder.getInt32(1)); in simplifyAllocaArraySize() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/ |
H A D | AArch64StackTagging.cpp | 326 void tagAlloca(AllocaInst *AI, Instruction *InsertBefore, Value *Ptr, 328 void untagAlloca(AllocaInst *AI, Instruction *InsertBefore, uint64_t Size); 433 void AArch64StackTagging::tagAlloca(AllocaInst *AI, Instruction *InsertBefore, in tagAlloca() argument 442 Triple(AI->getModule()->getTargetTriple()).isLittleEndian(); in tagAlloca() 446 LLVM_DEBUG(dbgs() << "collecting initializers for " << *AI in tagAlloca() 455 void AArch64StackTagging::untagAlloca(AllocaInst *AI, Instruction *InsertBefore, in untagAlloca() argument 458 IRB.CreateCall(SetTagFunc, {IRB.CreatePointerCast(AI, IRB.getPtrTy()), in untagAlloca() 470 AllocaInst *AI = Info.AI; in insertBaseTaggedPointer() local 472 PrologueBB = AI->getParent(); in insertBaseTaggedPointer() 475 PrologueBB = DT->findNearestCommonDominator(PrologueBB, AI->getParent()); in insertBaseTaggedPointer() [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/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) in print() 365 isSafeAccess(const Use & U,AllocaInst * AI,Value * V) isSafeAccess() argument 370 isSafeAccess(const Use & U,AllocaInst * AI,TypeSize TS) isSafeAccess() argument 379 isSafeAccess(const Use & U,AllocaInst * AI,const SCEV * AccessSize) isSafeAccess() argument 421 AllocaInst *AI = dyn_cast<AllocaInst>(Ptr); analyzeAllUses() local 562 if (auto *AI = dyn_cast<AllocaInst>(&I)) run() local 567 for (auto *AI : Allocas) { run() local 923 const AllocaInst *AI = KV.first; getInfo() local [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/llvm/include/llvm/ |
H A D | PassSupport.h | 157 PassInfo *AI = new PassInfo(name, &agName::ID); \ 158 Registry.registerAnalysisGroup(&agName::ID, 0, *AI, false, true); \ 159 return AI; \ 177 PassInfo *AI = new PassInfo(name, &agName::ID); \ 178 Registry.registerAnalysisGroup(&agName::ID, &passName::ID, *AI, def, \ 180 return AI; \ 199 PassInfo *AI = new PassInfo(n, &agName::ID); \ 200 Registry.registerAnalysisGroup(&agName::ID, &passName::ID, *AI, def, true); \ 201 return AI; \
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/ |
H A D | BoundsChecking.cpp | 167 } else if (AtomicCmpXchgInst *AI = dyn_cast<AtomicCmpXchgInst>(&I)) { in addBoundsChecking() local 168 if (!AI->isVolatile()) in addBoundsChecking() 170 getBoundsCheckCond(AI->getPointerOperand(), AI->getCompareOperand(), in addBoundsChecking() 172 } else if (AtomicRMWInst *AI = dyn_cast<AtomicRMWInst>(&I)) { in addBoundsChecking() local 173 if (!AI->isVolatile()) in addBoundsChecking() 174 Or = getBoundsCheckCond(AI->getPointerOperand(), AI->getValOperand(), in addBoundsChecking()
|
/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/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/llvm/lib/Target/X86/ |
H A D | X86RegisterInfo.cpp | 607 for (MCRegAliasIterator AI(X86::R8 + n, this, true); AI.isValid(); ++AI) in getReservedRegs() local 608 Reserved.set(*AI); in getReservedRegs() 611 for (MCRegAliasIterator AI(X86::XMM8 + n, this, true); AI.isValid(); ++AI) in getReservedRegs() local 612 Reserved.set(*AI); in getReservedRegs() 617 for (MCRegAliasIterator AI(X86::XMM16 + n, this, true); AI.isValid(); in getReservedRegs() local 618 ++AI) in getReservedRegs() 619 Reserved.set(*AI); in getReservedRegs() 628 for (MCRegAliasIterator AI(X86::R14, this, true); AI.isValid(); ++AI) in getReservedRegs() local 629 Reserved.set(*AI); in getReservedRegs() 630 for (MCRegAliasIterator AI(X86::R15, this, true); AI.isValid(); ++AI) in getReservedRegs() local [all …]
|