Home
last modified time | relevance | path

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

1234

/external/llvm/lib/Transforms/Utils/
DDemoteRegToStack.cpp22 AllocaInst *llvm::DemoteRegToStack(Instruction &I, bool VolatileLoads, in DemoteRegToStack()
30 AllocaInst *Slot; in DemoteRegToStack()
32 Slot = new AllocaInst(I.getType(), 0, in DemoteRegToStack()
36 Slot = new AllocaInst(I.getType(), 0, I.getName()+".reg2mem", in DemoteRegToStack()
99 AllocaInst *llvm::DemotePHIToStack(PHINode *P, Instruction *AllocaPoint) { in DemotePHIToStack()
106 AllocaInst *Slot; in DemotePHIToStack()
108 Slot = new AllocaInst(P->getType(), 0, in DemotePHIToStack()
112 Slot = new AllocaInst(P->getType(), 0, P->getName()+".reg2mem", in DemotePHIToStack()
DPromoteMemoryToRegister.cpp82 bool llvm::isAllocaPromotable(const AllocaInst *AI) { in isAllocaPromotable()
162 return (isa<LoadInst>(I) && isa<AllocaInst>(I->getOperand(0))) || in isInterestingInstruction()
163 (isa<StoreInst>(I) && isa<AllocaInst>(I->getOperand(1))); in isInterestingInstruction()
203 std::vector<AllocaInst*> Allocas;
213 DenseMap<AllocaInst*, unsigned> AllocaLookup;
248 PromoteMem2Reg(const std::vector<AllocaInst*> &A, DominatorTree &dt, in PromoteMem2Reg()
277 void DetermineInsertionPoint(AllocaInst *AI, unsigned AllocaNum,
279 void ComputeLiveInBlocks(AllocaInst *AI, AllocaInfo &Info,
283 void RewriteSingleStoreAlloca(AllocaInst *AI, AllocaInfo &Info,
285 void PromoteSingleBlockAlloca(AllocaInst *AI, AllocaInfo &Info,
[all …]
DLowerInvoke.cpp97 AllocaInst *InvokeNum, AllocaInst *StackPtr,
202 AllocaInst *InvokeNum, in rewriteExpensiveInvoke()
203 AllocaInst *StackPtr, in rewriteExpensiveInvoke()
288 while (isa<AllocaInst>(AfterAllocaInsertPt) && in splitLiveRangesLiveAcrossInvokes()
289 isa<ConstantInt>(cast<AllocaInst>(AfterAllocaInsertPt)->getArraySize())) in splitLiveRangesLiveAcrossInvokes()
336 if (AllocaInst *AI = dyn_cast<AllocaInst>(Inst)) in splitLiveRangesLiveAcrossInvokes()
434 AllocaInst *JmpBuf = in insertExpensiveEHSupport()
435 new AllocaInst(JBLinkTy, 0, Align, in insertExpensiveEHSupport()
459 AllocaInst *StackPtr = new AllocaInst(Type::getInt8PtrTy(F.getContext()), 0, in insertExpensiveEHSupport()
464 AllocaInst *InvokeNum = new AllocaInst(Type::getInt32Ty(F.getContext()), 0, in insertExpensiveEHSupport()
DMem2Reg.cpp58 std::vector<AllocaInst*> Allocas; in INITIALIZE_PASS_DEPENDENCY()
72 if (AllocaInst *AI = dyn_cast<AllocaInst>(I)) // Is it an alloca? in INITIALIZE_PASS_DEPENDENCY()
DInlineFunction.cpp372 Value *NewAlloca = new AllocaInst(AggTy, 0, Align, Arg->getName(), in HandleByValArgument()
423 static bool hasLifetimeMarkers(AllocaInst *AI) { in hasLifetimeMarkers()
626 AllocaInst *AI = dyn_cast<AllocaInst>(I++); in InlineFunction()
644 while (isa<AllocaInst>(I) && in InlineFunction()
645 isa<Constant>(cast<AllocaInst>(I)->getArraySize())) { in InlineFunction()
646 IFI.StaticAllocas.push_back(cast<AllocaInst>(I)); in InlineFunction()
664 AllocaInst *AI = IFI.StaticAllocas[ai]; in InlineFunction()
/external/llvm/lib/Transforms/Scalar/
DScalarReplAggregates.cpp101 AllocaInst *AI;
126 explicit AllocaInfo(AllocaInst *ai) in AllocaInfo()
151 bool isSafeAllocaToScalarRepl(AllocaInst *AI);
164 void DoScalarReplacement(AllocaInst *AI,
165 std::vector<AllocaInst*> &WorkList);
168 void RewriteForScalarRepl(Instruction *I, AllocaInst *AI, uint64_t Offset,
169 SmallVector<AllocaInst*, 32> &NewElts);
170 void RewriteBitCast(BitCastInst *BC, AllocaInst *AI, uint64_t Offset,
171 SmallVector<AllocaInst*, 32> &NewElts);
172 void RewriteGEP(GetElementPtrInst *GEPI, AllocaInst *AI, uint64_t Offset,
[all …]
DTailRecursionElimination.cpp124 static bool AllocaMightEscapeToCalls(AllocaInst *AI) { in AllocaMightEscapeToCalls()
136 if (AllocaInst *AI = dyn_cast<AllocaInst>(I)) { in CheckForEscapingAllocas()
489 if (AllocaInst *AI = dyn_cast<AllocaInst>(OEBI++)) in EliminateRecursiveTailCall()
DReg2Mem.cpp83 while (isa<AllocaInst>(I)) ++I; in INITIALIZE_PASS_DEPENDENCY()
97 if (!(isa<AllocaInst>(iib) && iib->getParent() == BBEntry) && in INITIALIZE_PASS_DEPENDENCY()
/external/llvm/include/llvm/Transforms/Utils/
DPromoteMemToReg.h22 class AllocaInst; variable
29 bool isAllocaPromotable(const AllocaInst *AI);
39 void PromoteMemToReg(const std::vector<AllocaInst*> &Allocas,
DLocal.h36 class AllocaInst; variable
151 AllocaInst *DemoteRegToStack(Instruction &X,
158 AllocaInst *DemotePHIToStack(PHINode *P, Instruction *AllocaPoint = 0);
DCloning.h45 class AllocaInst; variable
178 SmallVector<AllocaInst*, 4> StaticAllocas;
/external/llvm/lib/CodeGen/
DGCStrategy.cpp49 AllocaInst **Roots, unsigned Count);
180 bool LowerIntrinsics::InsertRootInitializers(Function &F, AllocaInst **Roots, in InsertRootInitializers()
184 while (isa<AllocaInst>(IP)) ++IP; in InsertRootInitializers()
187 SmallPtrSet<AllocaInst*,16> InitedRoots; in InsertRootInitializers()
190 if (AllocaInst *AI = in InsertRootInitializers()
191 dyn_cast<AllocaInst>(SI->getOperand(1)->stripPointerCasts())) in InsertRootInitializers()
197 for (AllocaInst **I = Roots, **E = Roots + Count; I != E; ++I) in InsertRootInitializers()
238 if (isa<AllocaInst>(I) || isa<GetElementPtrInst>(I) || in CouldBecomeSafePoint()
285 SmallVector<AllocaInst*, 32> Roots; in PerformDefaultLowering()
315 Roots.push_back(cast<AllocaInst>( in PerformDefaultLowering()
DStackProtector.cpp151 if (AllocaInst *AI = dyn_cast<AllocaInst>(II)) { in RequiresStackProtector()
174 AllocaInst *AI = 0; // Place on stack that stores the stack guard. in InsertStackProtectors()
206 AI = new AllocaInst(PtrTy, "StackGuardSlot", InsPt); in InsertStackProtectors()
DShadowStackGC.cpp53 std::vector<std::pair<CallInst*,AllocaInst*> > Roots;
328 SmallVector<std::pair<CallInst*, AllocaInst*>, 16> MetaRoots; in CollectRoots()
335 std::pair<CallInst*, AllocaInst*> Pair = std::make_pair( in CollectRoots()
336 CI, cast<AllocaInst>(CI->getArgOperand(0)->stripPointerCasts())); in CollectRoots()
396 while (isa<AllocaInst>(IP)) ++IP; in performCustomLowering()
411 AllocaInst *OriginalAlloca = Roots[I].second; in performCustomLowering()
DSjLjEHPrepare.cpp58 AllocaInst *FuncCtx;
196 new AllocaInst(FunctionContextTy, 0, Align, "fn_context", EntryBB->begin()); in setupFunctionContext()
241 while (isa<AllocaInst>(AfterAllocaInsPt) && in lowerIncomingArguments()
242 isa<ConstantInt>(cast<AllocaInst>(AfterAllocaInsPt)->getArraySize())) in lowerIncomingArguments()
301 if (AllocaInst *AI = dyn_cast<AllocaInst>(Inst)) in lowerAcrossUnwindEdges()
472 } else if (!isa<AllocaInst>(I)) { in setupEntryBlockAndCallSites()
/external/llvm/lib/Analysis/
DLoads.cpp96 if (const AllocaInst *AI = dyn_cast<AllocaInst>(Base)) { in isSafeToLoadUnconditionally()
217 if ((isa<AllocaInst>(Ptr) || isa<GlobalVariable>(Ptr)) && in FindAvailableLoadedValue()
218 (isa<AllocaInst>(SI->getOperand(1)) || in FindAvailableLoadedValue()
DCodeMetrics.cpp160 if (const AllocaInst *AI = dyn_cast<AllocaInst>(II)) { in analyzeBasicBlock()
/external/llvm/lib/Target/NVPTX/
DNVPTXAllocaHoisting.cpp28 AllocaInst *allocaInst = dyn_cast<AllocaInst>(BI++); in runOnFunction()
/external/llvm/unittests/VMCore/
DIRBuilderTest.cpp47 AllocaInst *Var1 = Builder.CreateAlloca(Builder.getInt8Ty()); in TEST_F()
48 AllocaInst *Var2 = Builder.CreateAlloca(Builder.getInt32Ty()); in TEST_F()
49 AllocaInst *Var3 = Builder.CreateAlloca(Builder.getInt8Ty(), in TEST_F()
/external/llvm/lib/CodeGen/SelectionDAG/
DFunctionLoweringInfo.cpp80 if (const AllocaInst *AI = dyn_cast<AllocaInst>(I)) in set()
109 if (!isa<AllocaInst>(I) || in set()
110 !StaticAllocaMap.count(cast<AllocaInst>(I))) in set()
128 if (const AllocaInst *AI = dyn_cast<AllocaInst>(Address)) { in set()
129 DenseMap<const AllocaInst *, int>::iterator SI = in set()
/external/llvm/lib/Transforms/IPO/
DInliner.cpp72 typedef DenseMap<ArrayType*, std::vector<AllocaInst*> >
123 SmallPtrSet<AllocaInst*, 16> UsedAllocas; in InlineCallIfPossible()
144 AllocaInst *AI = IFI.StaticAllocas[AllocaNo]; in InlineCallIfPossible()
154 std::vector<AllocaInst*> &AllocasForType = InlinedArrayAllocas[ATy]; in InlineCallIfPossible()
163 AllocaInst *AvailableAlloca = AllocasForType[i]; in InlineCallIfPossible()
/external/llvm/lib/Transforms/InstCombine/
DInstCombineLoadStoreAlloca.cpp145 isOnlyCopiedFromConstantGlobal(AllocaInst *AI, in isOnlyCopiedFromConstantGlobal()
172 Instruction *InstCombiner::visitAllocaInst(AllocaInst &AI) { in visitAllocaInst()
190 AllocaInst *New = Builder->CreateAlloca(NewTy, 0, AI.getName()); in visitAllocaInst()
197 while (isa<AllocaInst>(*It) || isa<DbgInfoIntrinsic>(*It)) ++It; in visitAllocaInst()
242 AllocaInst *EntryAI = dyn_cast<AllocaInst>(FirstInst); in visitAllocaInst()
599 if (isa<AllocaInst>(Ptr)) in visitStoreInst()
602 if (isa<AllocaInst>(GEP->getOperand(0))) { in visitStoreInst()
/external/llvm/lib/Transforms/Instrumentation/
DAddressSanitizer.cpp187 uint64_t getAllocaSizeInBytes(AllocaInst *AI) { in getAllocaSizeInBytes()
196 uint64_t getAlignedAllocaSize(AllocaInst *AI) { in getAlignedAllocaSize()
203 void PoisonStack(const ArrayRef<AllocaInst*> &AllocaVec, IRBuilder<> IRB,
958 void AddressSanitizer::PoisonStack(const ArrayRef<AllocaInst*> &AllocaVec, in PoisonStack()
979 AllocaInst *AI = AllocaVec[i]; in PoisonStack()
1042 SmallVector<AllocaInst*, 16> AllocaVec; in poisonStackInFunction()
1058 AllocaInst *AI = dyn_cast<AllocaInst>(BI); in poisonStackInFunction()
1082 AllocaInst *MyAlloca = in poisonStackInFunction()
1083 new AllocaInst(ByteArrayTy, "MyAlloca", InsBefore); in poisonStackInFunction()
1104 AllocaInst *AI = AllocaVec[i]; in poisonStackInFunction()
[all …]
/external/llvm/include/llvm/CodeGen/
DFunctionLoweringInfo.h36 class AllocaInst; variable
80 DenseMap<const AllocaInst*, int> StaticAllocaMap;
/external/llvm/examples/Kaleidoscope/Chapter7/
Dtoy.cpp608 static std::map<std::string, AllocaInst*> NamedValues;
615 static AllocaInst *CreateEntryBlockAlloca(Function *TheFunction, in CreateEntryBlockAlloca()
785 AllocaInst *Alloca = CreateEntryBlockAlloca(TheFunction, VarName); in Codegen()
806 AllocaInst *OldVal = NamedValues[VarName]; in Codegen()
861 std::vector<AllocaInst *> OldBindings; in Codegen()
883 AllocaInst *Alloca = CreateEntryBlockAlloca(TheFunction, VarName); in Codegen()
950 AllocaInst *Alloca = CreateEntryBlockAlloca(F, Args[Idx]); in CreateArgumentAllocas()

1234