Home
last modified time | relevance | path

Searched refs:AllocaInst (Results 1 – 25 of 229) sorted by relevance

12345678910

/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/
H A DSROA.h29 class AllocaInst; global() variable
H A DMemCpyOptimizer.h23 class AllocaInst; variable
88 AllocaInst *DestAlloca, AllocaInst *SrcAlloca,
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DSafeStack.cpp137 AllocaInst *StackGuardSlot, Value *StackGuard);
142 void findInsts(Function &F, SmallVectorImpl<AllocaInst *> &StaticAllocas,
143 SmallVectorImpl<AllocaInst *> &DynamicAllocas,
150 uint64_t getStaticAllocaAllocationSize(const AllocaInst* AI);
158 ArrayRef<AllocaInst *> StaticAllocas,
161 AllocaInst *StackGuardSlot);
168 AllocaInst *
177 AllocaInst *DynamicTop,
178 ArrayRef<AllocaInst *> DynamicAllocas);
205 uint64_t SafeStack::getStaticAllocaAllocationSize(const AllocaInst* AI) { in getStaticAllocaAllocationSize()
[all …]
H A DGCRootLowering.cpp149 if (isa<AllocaInst>(I) || isa<GetElementPtrInst>(I) || isa<StoreInst>(I) || in CouldBecomeSafePoint()
163 static bool InsertRootInitializers(Function &F, ArrayRef<AllocaInst *> Roots) { in InsertRootInitializers()
166 while (isa<AllocaInst>(IP)) in InsertRootInitializers()
170 SmallPtrSet<AllocaInst *, 16> InitedRoots; in InsertRootInitializers()
173 if (AllocaInst *AI = in InsertRootInitializers()
174 dyn_cast<AllocaInst>(SI->getOperand(1)->stripPointerCasts())) in InsertRootInitializers()
180 for (AllocaInst *Root : Roots) in InsertRootInitializers()
205 SmallVector<AllocaInst *, 32> Roots; in DoLowering()
240 cast<AllocaInst>(CI->getArgOperand(0)->stripPointerCasts())); in DoLowering()
H A DStackColoring.cpp672 const AllocaInst *Allocation = MFI->getObjectAllocation(Slot); in collectMarkers()
757 const AllocaInst *Allocation = MFI->getObjectAllocation(Slot); in collectMarkers()
926 DenseMap<const AllocaInst*, const AllocaInst*> Allocas; in remapInstructions()
929 SmallPtrSet<const AllocaInst*, 32> MergedAllocas; in remapInstructions()
932 const AllocaInst *From = MFI->getObjectAllocation(SI.first); in remapInstructions()
933 const AllocaInst *To = MFI->getObjectAllocation(SI.second); in remapInstructions()
940 const_cast<AllocaInst *>(To)->moveBefore( in remapInstructions()
941 const_cast<AllocaInst *>(From)->getIterator()); in remapInstructions()
949 Instruction *Inst = const_cast<AllocaInst *>(To); in remapInstructions()
974 AllocaInst *FromAI = const_cast<AllocaInst *>(From); in remapInstructions()
[all …]
H A DShadowStackGCLowering.cpp65 std::vector<std::pair<CallInst *, AllocaInst *>> Roots;
206 for (const std::pair<CallInst *, AllocaInst *> &Root : Roots) in GetConcreteStackEntryType()
280 SmallVector<std::pair<CallInst *, AllocaInst *>, 16> MetaRoots; in CollectRoots()
287 std::pair<CallInst *, AllocaInst *> Pair = std::make_pair( in CollectRoots()
289 cast<AllocaInst>(CI->getArgOperand(0)->stripPointerCasts())); in CollectRoots()
374 AllocaInst *OriginalAlloca = Roots[I].second; in runOnFunction()
411 for (std::pair<CallInst *, AllocaInst *> &Root : Roots) { in runOnFunction()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DDemoteRegToStack.cpp23 AllocaInst *llvm::DemoteRegToStack(Instruction &I, bool VolatileLoads, in DemoteRegToStack()
34 AllocaInst *Slot; in DemoteRegToStack()
36 Slot = new AllocaInst(I.getType(), DL.getAllocaAddrSpace(), nullptr, in DemoteRegToStack()
39 Slot = new AllocaInst(I.getType(), DL.getAllocaAddrSpace(), nullptr, in DemoteRegToStack()
132 AllocaInst *llvm::DemotePHIToStack(PHINode *P, std::optional<BasicBlock::iterator> AllocaPoint) { in DemotePHIToStack()
141 AllocaInst *Slot; in DemotePHIToStack()
143 Slot = new AllocaInst(P->getType(), DL.getAllocaAddrSpace(), nullptr, in DemotePHIToStack()
147 Slot = new AllocaInst(P->getType(), DL.getAllocaAddrSpace(), nullptr, in DemotePHIToStack()
H A DPromoteMemoryToRegister.cpp66 bool llvm::isAllocaPromotable(const AllocaInst *AI) { in isAllocaPromotable()
135 void init(AllocaInst *AI) { in init()
243 void AnalyzeAlloca(AllocaInst *AI) { in AnalyzeAlloca()
345 return (isa<LoadInst>(I) && isa<AllocaInst>(I->getOperand(0))) || in isInterestingInstruction()
346 (isa<StoreInst>(I) && isa<AllocaInst>(I->getOperand(1))); in isInterestingInstruction()
380 std::vector<AllocaInst *> Allocas;
391 DenseMap<AllocaInst *, unsigned> AllocaLookup;
438 PromoteMem2Reg(ArrayRef<AllocaInst *> Allocas, DominatorTree &DT, in PromoteMem2Reg()
462 void ComputeLiveInBlocks(AllocaInst *AI, AllocaInfo &Info,
528 static void removeIntrinsicUsers(AllocaInst *AI) { in removeIntrinsicUsers()
[all …]
H A DMemoryTaggingSupport.cpp119 if (auto *AI = dyn_cast_or_null<AllocaInst>(V)) { in visit()
140 if (AllocaInst *AI = dyn_cast<AllocaInst>(&Inst)) { in visit()
158 AllocaInst *AI = findAllocaForValue(II->getArgOperand(1)); in visit()
173 if (auto *AI = dyn_cast_or_null<AllocaInst>(V)) { in visit()
194 StackInfoBuilder::getAllocaInterestingness(const AllocaInst &AI) { in getAllocaInterestingness()
219 uint64_t getAllocaSizeInBytes(const AllocaInst &AI) { in getAllocaSizeInBytes()
243 auto *NewAI = new AllocaInst(TypeWithPadding, Info.AI->getAddressSpace(), in alignAndPadAlloca()
H A DMem2Reg.cpp37 std::vector<AllocaInst *> Allocas; in promoteMemoryToRegister()
47 if (AllocaInst *AI = dyn_cast<AllocaInst>(I)) // Is it an alloca? in promoteMemoryToRegister()
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/
H A DMemoryTaggingSupport.h29 class AllocaInst; variable
53 AllocaInst *AI;
62 MapVector<AllocaInst *, AllocaInfo> AllocasToInstrument;
83 AllocaInterestingness getAllocaInterestingness(const AllocaInst &AI);
92 uint64_t getAllocaSizeInBytes(const AllocaInst &AI);
H A DPromoteMemToReg.h22 class AllocaInst; variable
32 LLVM_ABI bool isAllocaPromotable(const AllocaInst *AI);
41 LLVM_ABI void PromoteMemToReg(ArrayRef<AllocaInst *> Allocas, DominatorTree &DT,
H A DCodeExtractor.h26 class AllocaInst; variable
49 SmallVector<AllocaInst *, 16> Allocas;
66 ArrayRef<AllocaInst *> getAllocas() const { return Allocas; } in getAllocas()
71 AllocaInst *Addr) const;
H A DASanStackFrameLayout.h20 class AllocaInst; variable
38 AllocaInst *AI; // The actual AllocaInst.
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DStackLifetime.h23 class AllocaInst; variable
104 ArrayRef<const AllocaInst *> Allocas;
106 DenseMap<const AllocaInst *, unsigned> AllocaNumbering;
135 StackLifetime(const Function &F, ArrayRef<const AllocaInst *> Allocas,
152 const LiveRange &getLiveRange(const AllocaInst *AI) const;
158 bool isAliveAfter(const AllocaInst *AI, const Instruction *I) const;
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DStackLifetime.cpp35 StackLifetime::getLiveRange(const AllocaInst *AI) const { in getLiveRange()
45 bool StackLifetime::isAliveAfter(const AllocaInst *AI, in isAliveAfter()
64 static const AllocaInst *findMatchingAlloca(const IntrinsicInst &II, in findMatchingAlloca()
66 const AllocaInst *AI = findAllocaForValue(II.getArgOperand(1), true); in findMatchingAlloca()
98 const AllocaInst *AI = findMatchingAlloca(*II, DL); in collectMarkers()
319 ArrayRef<const AllocaInst *> Allocas, in StackLifetime()
403 SmallVector<const AllocaInst *, 8> Allocas; in run()
405 if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) in run()
H A DStackSafetyAnalysis.cpp154 ConstantRange getStaticAllocaSizeRange(const AllocaInst &AI) { in getStaticAllocaSizeRange()
184 std::map<const AllocaInst *, UseInfo<CalleeTy>> Allocas;
210 if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) { in print()
232 SmallPtrSet<const AllocaInst *, 8> SafeAllocas;
265 bool isSafeAccess(const Use &U, AllocaInst *AI, const SCEV *AccessSize);
266 bool isSafeAccess(const Use &U, AllocaInst *AI, Value *V);
267 bool isSafeAccess(const Use &U, AllocaInst *AI, TypeSize AccessSize);
365 bool StackSafetyLocalAnalysis::isSafeAccess(const Use &U, AllocaInst *AI, in isSafeAccess()
370 bool StackSafetyLocalAnalysis::isSafeAccess(const Use &U, AllocaInst *AI, in isSafeAccess()
379 bool StackSafetyLocalAnalysis::isSafeAccess(const Use &U, AllocaInst *AI, in isSafeAccess()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/DirectX/
H A DDXILDataScalarization.cpp63 bool visitAllocaInst(AllocaInst &AI);
84 typedef std::pair<AllocaInst *, SmallVector<Value *, 4>> AllocaAndGEPs;
130 bool DataScalarizerVisitor::visitAllocaInst(AllocaInst &AI) { in visitAllocaInst()
137 AllocaInst *ArrAlloca = in visitAllocaInst()
197 AllocaInst *ArrAlloca = in createArrayFromVector()
223 dynamicallyLoadArray(IRBuilder<> &Builder, AllocaInst *ArrAlloca, Value *Index, in dynamicallyLoadArray()
243 AllocaInst *ArrAlloca = ArrAllocaAndGEPs.first; in replaceDynamicInsertElementInst()
284 AllocaInst *ArrAlloca = ArrAllocaAndGEPs.first; in replaceDynamicExtractElementInst()
313 } else if (AllocaInst *Alloca = dyn_cast<AllocaInst>(PtrOperand)) { in visitGetElementPtrInst()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Coroutines/
H A DCoroFrame.cpp193 [[nodiscard]] FieldIDType addFieldForAlloca(AllocaInst *AI, in addFieldForAlloca()
340 using AllocaSetType = SmallVector<AllocaInst *, 4>; in addFieldForAllocas()
355 AllocaInst *Alloca = A.Alloca; in addFieldForAllocas()
394 auto DoAllocasInterfere = [&](const AllocaInst *AI1, const AllocaInst *AI2) { in addFieldForAllocas()
412 AllocaInst *Alloca = A.Alloca; in addFieldForAllocas()
871 AllocaInst *PromiseAlloca = Shape.getPromiseAlloca(); in buildFrameType()
1005 SmallDenseMap<Argument *, AllocaInst *, 4> ArgToAllocaMap; in insertSpills()
1017 if (auto *AI = dyn_cast<AllocaInst>(Orig)) { in insertSpills()
1030 if (auto *AI = dyn_cast<AllocaInst>(Orig)) { in insertSpills()
1119 if (!isa<AllocaInst, LoadInst>(CurDef)) in insertSpills()
[all …]
H A DCoroInternal.h43 SmallDenseMap<Argument *, AllocaInst *, 4> &ArgToAllocaMap,
46 SmallDenseMap<Argument *, AllocaInst *, 4> &ArgToAllocaMap,
/freebsd/contrib/llvm-project/llvm/lib/Target/NVPTX/
H A DNVPTXAllocaHoisting.cpp48 AllocaInst *allocaInst = dyn_cast<AllocaInst>(BI++); in runOnFunction()
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Coroutines/
H A DSpillUtils.h23 AllocaInst *Alloca;
26 AllocaInfo(AllocaInst *Alloca, in AllocaInfo()
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPUPromoteAlloca.cpp125 bool tryPromoteAllocaToVector(AllocaInst &I);
126 bool tryPromoteAllocaToLDS(AllocaInst &I, bool SufficientLDS);
128 void sortAllocasToPromote(SmallVectorImpl<AllocaInst *> &Allocas);
239 static void collectAllocaUses(AllocaInst &Alloca, in collectAllocaUses()
254 SmallVectorImpl<AllocaInst *> &Allocas) { in sortAllocasToPromote()
255 DenseMap<AllocaInst *, unsigned> Scores; in sortAllocasToPromote()
275 stable_sort(Allocas, [&](AllocaInst *A, AllocaInst *B) { in sortAllocasToPromote()
318 SmallVector<AllocaInst *, 16> Allocas; in run()
320 if (AllocaInst *AI = dyn_cast<AllocaInst>(&I)) { in run()
332 for (AllocaInst *AI : Allocas) { in run()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/
H A DWebAssemblyRefTypeMem2Local.cpp46 void visitAllocaInst(AllocaInst &AI);
59 void WebAssemblyRefTypeMem2Local::visitAllocaInst(AllocaInst &AI) { in visitAllocaInst()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DSROA.cpp184 SmallSetVector<AllocaInst *, 16> Worklist;
199 SmallSetVector<AllocaInst *, 16> PostPromotionWorklist;
202 SetVector<AllocaInst *, SmallVector<AllocaInst *>,
203 SmallPtrSet<AllocaInst *, 16>, 16>
248 bool presplitLoadsAndStores(AllocaInst &AI, AllocaSlices &AS);
249 AllocaInst *rewritePartition(AllocaInst &AI, AllocaSlices &AS, Partition &P);
250 bool splitAlloca(AllocaInst &AI, AllocaSlices &AS);
251 bool propagateStoredValuesToLoads(AllocaInst &AI, AllocaSlices &AS);
252 std::pair<bool /*Changed*/, bool /*CFGChanged*/> runOnAlloca(AllocaInst &AI);
254 bool deleteDeadInstructions(SmallPtrSetImpl<AllocaInst *> &DeletedAllocas);
[all …]

12345678910