Lines Matching defs:alloca
31 /// Return `true` if this allocation is to remain on the stack (`fir.alloca`).
34 keepStackAllocation(fir::AllocaOp alloca,
37 if (options.dynamicArrayOnHeap && alloca.isDynamic())
41 if (auto seqTy = mlir::dyn_cast<fir::SequenceType>(alloca.getInType())) {
61 static mlir::Value genAllocmem(mlir::OpBuilder &builder, fir::AllocaOp alloca,
63 mlir::Type varTy = alloca.getInType();
69 llvm::StringRef uniqName = unpackName(alloca.getUniqName());
70 llvm::StringRef bindcName = unpackName(alloca.getBindcName());
71 auto heap = builder.create<fir::AllocMemOp>(alloca.getLoc(), varTy, uniqName,
72 bindcName, alloca.getTypeparams(),
73 alloca.getShape());
74 LLVM_DEBUG(llvm::dbgs() << "memory allocation opt: replaced " << alloca
86 /// This pass can reclassify memory allocations (fir.alloca, fir.allocmem) based
136 auto tryReplacing = [&](fir::AllocaOp alloca) {
137 bool res = !keepStackAllocation(alloca, options);
140 << "memory allocation opt: found " << alloca << '\n');