Lines Matching defs:Alloca

99   /// Val is a derived pointer from Alloca. OpIdx0/OpIdx1 are the operand
103 bool binaryOpIsDerivedFromSameAlloca(Value *Alloca, Value *Val,
144 StringRef getPassName() const override { return "AMDGPU Promote Alloca"; }
171 return "AMDGPU Promote Alloca to vector";
252 static void collectAllocaUses(AllocaInst &Alloca,
254 SmallVector<Instruction *, 4> WorkList({&Alloca});
270 for (auto *Alloca : Allocas) {
271 LLVM_DEBUG(dbgs() << "Scoring: " << *Alloca << "\n");
272 unsigned &Score = Scores[Alloca];
275 collectAllocaUses(*Alloca, Uses);
350 LLVM_DEBUG(dbgs() << "Alloca too big for vectorization (size:"
400 static Value *GEPToVectorIndex(GetElementPtrInst *GEP, AllocaInst *Alloca,
407 if (GEP->getPointerOperand()->stripPointerCasts() != Alloca ||
727 bool AMDGPUPromoteAllocaImpl::tryPromoteAllocaToVector(AllocaInst &Alloca) {
728 LLVM_DEBUG(dbgs() << "Trying to promote to vector: " << Alloca << '\n');
735 Type *AllocaTy = Alloca.getAllocatedType();
773 collectAllocaUses(Alloca, Uses);
801 // Alloca already accessed as vector.
802 if (Ptr == &Alloca && DL->getTypeStoreSize(Alloca.getAllocatedType()) ==
818 Value *Index = GEPToVectorIndex(GEP, &Alloca, VecEltTy, *DL);
828 MSI && isSupportedMemset(MSI, &Alloca, *DL)) {
850 if (Ptr != &Alloca && !GEPVectorIdx.count(GEP))
915 // Alloca is uninitialized memory. Imitate that by making the first value
919 Updater.AddAvailableValue(Alloca.getParent(), UndefValue::get(VectorTy));
964 // Alloca should now be dead too.
965 assert(Alloca.use_empty());
966 Alloca.eraseFromParent();