Lines Matching refs:AllocaInst
101 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,
173 SmallVector<AllocaInst*, 32> &NewElts);
174 void RewriteLifetimeIntrinsic(IntrinsicInst *II, AllocaInst *AI,
176 SmallVector<AllocaInst*, 32> &NewElts);
178 AllocaInst *AI,
179 SmallVector<AllocaInst*, 32> &NewElts);
180 void RewriteStoreUserOfWholeAlloca(StoreInst *SI, AllocaInst *AI,
181 SmallVector<AllocaInst*, 32> &NewElts);
182 void RewriteLoadUserOfWholeAlloca(LoadInst *LI, AllocaInst *AI,
183 SmallVector<AllocaInst*, 32> &NewElts);
184 bool ShouldAttemptScalarRepl(AllocaInst *AI);
310 AllocaInst *TryConvert(AllocaInst *AI);
316 void ConvertUsesToScalar(Value *Ptr, AllocaInst *NewAI, uint64_t Offset,
332 AllocaInst *ConvertToScalarInfo::TryConvert(AllocaInst *AI) { in TryConvert()
379 AllocaInst *NewAI = new AllocaInst(NewTy, 0, "", AI->getParent()->begin()); in TryConvert()
596 void ConvertToScalarInfo::ConvertUsesToScalar(Value *Ptr, AllocaInst *NewAI, in ConvertUsesToScalar()
695 AllocaInst *OrigAI = cast<AllocaInst>(GetUnderlyingObject(Ptr, &TD, 0)); in ConvertUsesToScalar()
1046 AllocaInst *AI;
1055 void run(AllocaInst *AI, const SmallVectorImpl<Instruction*> &Insts) { in run()
1239 static bool tryToMakeAllocaBePromotable(AllocaInst *AI, const TargetData *TD) { in tryToMakeAllocaBePromotable()
1407 std::vector<AllocaInst*> Allocas; in performPromotion()
1422 if (AllocaInst *AI = dyn_cast<AllocaInst>(I)) // Is it an alloca? in performPromotion()
1433 AllocaInst *AI = Allocas[i]; in performPromotion()
1453 bool SROA::ShouldAttemptScalarRepl(AllocaInst *AI) { in ShouldAttemptScalarRepl()
1469 std::vector<AllocaInst*> WorkList; in performScalarRepl()
1474 if (AllocaInst *A = dyn_cast<AllocaInst>(I)) in performScalarRepl()
1480 AllocaInst *AI = WorkList.back(); in performScalarRepl()
1522 if (AllocaInst *NewAI = ConvertToScalarInfo( in performScalarRepl()
1539 void SROA::DoScalarReplacement(AllocaInst *AI, in DoScalarReplacement()
1540 std::vector<AllocaInst*> &WorkList) { in DoScalarReplacement()
1542 SmallVector<AllocaInst*, 32> ElementAllocas; in DoScalarReplacement()
1546 AllocaInst *NA = new AllocaInst(ST->getContainedType(i), 0, in DoScalarReplacement()
1557 AllocaInst *NA = new AllocaInst(ElTy, 0, AI->getAlignment(), in DoScalarReplacement()
1587 if (isInstructionTriviallyDead(U) && !isa<AllocaInst>(U)) in DeleteDeadInstructions()
1876 void SROA::RewriteForScalarRepl(Instruction *I, AllocaInst *AI, uint64_t Offset, in RewriteForScalarRepl()
1877 SmallVector<AllocaInst*, 32> &NewElts) { in RewriteForScalarRepl() argument
1971 if (!isa<AllocaInst>(I)) continue; in RewriteForScalarRepl()
1979 AllocaInst *NewAI = NewElts[0]; in RewriteForScalarRepl()
1990 void SROA::RewriteBitCast(BitCastInst *BC, AllocaInst *AI, uint64_t Offset, in RewriteBitCast()
1991 SmallVector<AllocaInst*, 32> &NewElts) { in RewriteBitCast() argument
2048 void SROA::RewriteGEP(GetElementPtrInst *GEPI, AllocaInst *AI, uint64_t Offset, in RewriteGEP()
2049 SmallVector<AllocaInst*, 32> &NewElts) { in RewriteGEP() argument
2109 void SROA::RewriteLifetimeIntrinsic(IntrinsicInst *II, AllocaInst *AI, in RewriteLifetimeIntrinsic()
2111 SmallVector<AllocaInst*, 32> &NewElts) { in RewriteLifetimeIntrinsic() argument
2166 AllocaInst *AI, in RewriteMemIntrinUserOfAlloca()
2167 SmallVector<AllocaInst*, 32> &NewElts) { in RewriteMemIntrinUserOfAlloca() argument
2338 void SROA::RewriteStoreUserOfWholeAlloca(StoreInst *SI, AllocaInst *AI, in RewriteStoreUserOfWholeAlloca()
2339 SmallVector<AllocaInst*, 32> &NewElts){ in RewriteStoreUserOfWholeAlloca() argument
2452 void SROA::RewriteLoadUserOfWholeAlloca(LoadInst *LI, AllocaInst *AI, in RewriteLoadUserOfWholeAlloca()
2453 SmallVector<AllocaInst*, 32> &NewElts) { in RewriteLoadUserOfWholeAlloca() argument
2576 bool SROA::isSafeAllocaToScalarRepl(AllocaInst *AI) { in isSafeAllocaToScalarRepl()