Home
last modified time | relevance | path

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

123456789

/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/
H A DSROA.h29 class AllocaInst; global() variable
H A DMemCpyOptimizer.h23 class AllocaInst; variable
86 AllocaInst *DestAlloca, AllocaInst *SrcAlloca,
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DSafeStack.cpp138 AllocaInst *StackGuardSlot, Value *StackGuard);
143 void findInsts(Function &F, SmallVectorImpl<AllocaInst *> &StaticAllocas,
144 SmallVectorImpl<AllocaInst *> &DynamicAllocas,
151 uint64_t getStaticAllocaAllocationSize(const AllocaInst* AI);
159 ArrayRef<AllocaInst *> StaticAllocas,
162 AllocaInst *StackGuardSlot);
169 AllocaInst *
178 AllocaInst *DynamicTop,
179 ArrayRef<AllocaInst *> DynamicAllocas);
206 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.cpp667 const AllocaInst *Allocation = MFI->getObjectAllocation(Slot); in collectMarkers()
752 const AllocaInst *Allocation = MFI->getObjectAllocation(Slot); in collectMarkers()
921 DenseMap<const AllocaInst*, const AllocaInst*> Allocas; in remapInstructions()
924 SmallPtrSet<const AllocaInst*, 32> MergedAllocas; in remapInstructions()
927 const AllocaInst *From = MFI->getObjectAllocation(SI.first); in remapInstructions()
928 const AllocaInst *To = MFI->getObjectAllocation(SI.second); in remapInstructions()
935 const_cast<AllocaInst*>(To)->moveBefore(const_cast<AllocaInst*>(From)); in remapInstructions()
943 Instruction *Inst = const_cast<AllocaInst *>(To); in remapInstructions()
968 AllocaInst *FromAI = const_cast<AllocaInst *>(From); in remapInstructions()
997 const AllocaInst *AI = dyn_cast_or_null<AllocaInst>(MMO->getValue()); in remapInstructions()
[all …]
H A DShadowStackGCLowering.cpp66 std::vector<std::pair<CallInst *, AllocaInst *>> Roots;
207 for (const std::pair<CallInst *, AllocaInst *> &Root : Roots) in doInitialization()
282 SmallVector<std::pair<CallInst *, AllocaInst *>, 16> MetaRoots; in CreateGEP()
289 std::pair<CallInst *, AllocaInst *> Pair = std::make_pair( in getAnalysisUsage()
291 cast<AllocaInst>(CI->getArgOperand(0)->stripPointerCasts()));
376 AllocaInst *OriginalAlloca = Roots[I].second; in runOnFunction()
413 for (std::pair<CallInst *, AllocaInst *> &Root : Roots) {
H A DStackProtector.cpp93 const AllocaInst *AI = MFI.getObjectAllocation(I); in runOnFunction()
411 if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) { in requiresStackProtector()
536 const TargetLoweringBase *TLI, AllocaInst *&AI) { in InsertStackProtectors()
560 AllocaInst *AI = nullptr; // Place on stack that stores the stack guard. in InsertStackProtectors()
597 AI = cast<AllocaInst>(SPCall->getArgOperand(1)); in InsertStackProtectors()
/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.cpp65 bool llvm::isAllocaPromotable(const AllocaInst *AI) { in isAllocaPromotable()
132 void init(AllocaInst *AI) { in init()
240 void AnalyzeAlloca(AllocaInst *AI) { in AnalyzeAlloca()
312 return (isa<LoadInst>(I) && isa<AllocaInst>(I->getOperand(0))) || in isInterestingInstruction()
313 (isa<StoreInst>(I) && isa<AllocaInst>(I->getOperand(1))); in isInterestingInstruction()
347 std::vector<AllocaInst *> Allocas;
358 DenseMap<AllocaInst *, unsigned> AllocaLookup;
400 PromoteMem2Reg(ArrayRef<AllocaInst *> Allocas, DominatorTree &DT, in PromoteMem2Reg()
423 void ComputeLiveInBlocks(AllocaInst *AI, AllocaInfo &Info,
479 static void removeIntrinsicUsers(AllocaInst *AI) { in removeIntrinsicUsers()
[all …]
H A DMemoryTaggingSupport.cpp118 if (auto *AI = dyn_cast_or_null<AllocaInst>(V)) { in visit()
138 if (AllocaInst *AI = dyn_cast<AllocaInst>(&Inst)) { in visit()
147 AllocaInst *AI = findAllocaForValue(II->getArgOperand(1)); in visit()
162 if (auto *AI = dyn_cast_or_null<AllocaInst>(V)) { in visit()
181 bool StackInfoBuilder::isInterestingAlloca(const AllocaInst &AI) { in isInterestingAlloca()
201 uint64_t getAllocaSizeInBytes(const AllocaInst &AI) { in getAllocaSizeInBytes()
225 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.h28 class AllocaInst; variable
52 AllocaInst *AI;
61 MapVector<AllocaInst *, AllocaInfo> AllocasToInstrument;
72 bool isInterestingAlloca(const AllocaInst &AI);
80 uint64_t getAllocaSizeInBytes(const AllocaInst &AI);
H A DPromoteMemToReg.h20 class AllocaInst; variable
30 bool isAllocaPromotable(const AllocaInst *AI);
39 void PromoteMemToReg(ArrayRef<AllocaInst *> Allocas, DominatorTree &DT,
H A DCodeExtractor.h25 class AllocaInst; variable
48 SmallVector<AllocaInst *, 16> Allocas;
65 ArrayRef<AllocaInst *> getAllocas() const { return Allocas; } in getAllocas()
69 bool doesBlockContainClobberOfAddr(BasicBlock &BB, AllocaInst *Addr) const;
H A DASanStackFrameLayout.h19 class AllocaInst; variable
37 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 *A
[all...]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DSROA.cpp183 SmallSetVector<AllocaInst *, 16> Worklist;
198 SmallSetVector<AllocaInst *, 16> PostPromotionWorklist;
201 std::vector<AllocaInst *> PromotableAllocas;
245 bool presplitLoadsAndStores(AllocaInst &AI, AllocaSlices &AS);
246 AllocaInst *rewritePartition(AllocaInst &AI, AllocaSlices &AS, Partition &P);
247 bool splitAlloca(AllocaInst &AI, AllocaSlices &AS);
248 std::pair<bool /*Changed*/, bool /*CFGChanged*/> runOnAlloca(AllocaInst &AI);
250 bool deleteDeadInstructions(SmallPtrSetImpl<AllocaInst *> &DeletedAllocas);
349 static void migrateDebugInfo(AllocaInst *OldAlloca, bool IsSplit, in migrateDebugInfo()
594 AllocaSlices(const DataLayout &DL, AllocaInst &AI);
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPUPromoteAlloca.cpp110 bool tryPromoteAllocaToVector(AllocaInst &I);
111 bool tryPromoteAllocaToLDS(AllocaInst &I, bool SufficientLDS);
113 void sortAllocasToPromote(SmallVectorImpl<AllocaInst *> &Allocas);
252 static void collectAllocaUses(AllocaInst &Alloca, in collectAllocaUses()
267 SmallVectorImpl<AllocaInst *> &Allocas) { in sortAllocasToPromote()
268 DenseMap<AllocaInst *, unsigned> Scores; in sortAllocasToPromote()
288 stable_sort(Allocas, [&](AllocaInst *A, AllocaInst *B) { in sortAllocasToPromote()
320 SmallVector<AllocaInst *, 16> Allocas; in run()
322 if (AllocaInst *AI = dyn_cast<AllocaInst>(&I)) { in run()
334 for (AllocaInst *AI : Allocas) { in run()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Coroutines/
H A DCoroInternal.h35 SmallDenseMap<Argument *, AllocaInst *, 4> &ArgToAllocaMap,
38 SmallDenseMap<Argument *, AllocaInst *, 4> &ArgToAllocaMap,
118 AllocaInst *PromiseAlloca;
243 AllocaInst *getPromiseAlloca() const { in getPromiseAlloca()
H A DCoroFrame.cpp459 AllocaInst *Alloca;
462 AllocaInfo(AllocaInst *Alloca, in AllocaInfo()
616 [[nodiscard]] FieldIDType addFieldForAlloca(AllocaInst *AI, in addFieldForAlloca()
762 using AllocaSetType = SmallVector<AllocaInst *, 4>; in addFieldForAllocas()
777 AllocaInst *Alloca = A.Alloca; in addFieldForAllocas()
816 auto IsAllocaInferenre = [&](const AllocaInst *AI1, const AllocaInst *AI2) { in addFieldForAllocas()
834 AllocaInst *Alloca = A.Alloca; in addFieldForAllocas()
1124 AllocaInst *PromiseAlloca = Shape.getPromiseAlloca(); in buildFrameDebugInfo()
1316 AllocaInst *PromiseAlloca = Shape.getPromiseAlloca(); in buildFrameType()
1498 auto *AI = dyn_cast<AllocaInst>(SI.getPointerOperand()); in visitStoreInst()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/NVPTX/
H A DNVPTXAllocaHoisting.cpp47 AllocaInst *allocaInst = dyn_cast<AllocaInst>(BI++); in runOnFunction()
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/
H A DMachineFrameInfo.h28 class AllocaInst; variable
164 const AllocaInst *Alloca;
185 bool IsImmutable, bool IsSpillSlot, const AllocaInst *Alloca,
512 const AllocaInst* getObjectAllocation(int ObjectIdx) const { in getObjectAllocation()
788 const AllocaInst *Alloca = nullptr, uint8_t ID = 0);
803 int CreateVariableSizedObject(Align Alignment, const AllocaInst *Alloca);
/freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/
H A DWebAssemblyRefTypeMem2Local.cpp46 void visitAllocaInst(AllocaInst &AI);
59 void WebAssemblyRefTypeMem2Local::visitAllocaInst(AllocaInst &AI) { in visitAllocaInst()

123456789