Lines Matching full:loc

23 fir::factory::Counter::Counter(mlir::Location loc, fir::FirOpBuilder &builder,  in Counter()  argument
28 one = builder.createIntegerConstant(loc, type, 1);
30 index = builder.createTemporary(loc, type);
31 builder.create<fir::StoreOp>(loc, initialValue, index);
38 fir::factory::Counter::getAndIncrementIndex(mlir::Location loc, in getAndIncrementIndex() argument
41 mlir::Value indexValue = builder.create<fir::LoadOp>(loc, index); in getAndIncrementIndex()
43 builder.create<mlir::arith::AddIOp>(loc, indexValue, one); in getAndIncrementIndex()
44 builder.create<fir::StoreOp>(loc, newValue, index); in getAndIncrementIndex()
48 index = builder.create<mlir::arith::AddIOp>(loc, indexValue, one); in getAndIncrementIndex()
52 void fir::factory::Counter::reset(mlir::Location loc, in reset() argument
55 builder.create<fir::StoreOp>(loc, initialValue, index); in reset()
65 mlir::Location loc, fir::FirOpBuilder &builder, in HomogeneousScalarStack() argument
70 counter{loc, builder,
71 builder.createIntegerConstant(loc, builder.getIndexType(), 1),
77 tempStorage = builder.createHeapTemporary(loc, declaredType, tempName,
81 builder.createTemporary(loc, declaredType, tempName, extents, lengths);
83 mlir::Value shape = builder.genShape(loc, extents);
85 .create<hlfir::DeclareOp>(loc, tempStorage, tempName, shape,
91 void fir::factory::HomogeneousScalarStack::pushValue(mlir::Location loc, in pushValue() argument
96 mlir::Value indexValue = counter.getAndIncrementIndex(loc, builder); in pushValue()
98 loc, builder, hlfir::Entity{temp}, mlir::ValueRange{indexValue}); in pushValue()
105 TODO(loc, "creating inlined temporary stack for derived types"); in pushValue()
106 builder.create<hlfir::AssignOp>(loc, value, tempElement); in pushValue()
110 mlir::Location loc, fir::FirOpBuilder &builder) { in resetFetchPosition() argument
111 counter.reset(loc, builder); in resetFetchPosition()
115 fir::factory::HomogeneousScalarStack::fetch(mlir::Location loc, in fetch() argument
117 mlir::Value indexValue = counter.getAndIncrementIndex(loc, builder); in fetch()
119 loc, builder, hlfir::Entity{temp}, mlir::ValueRange{indexValue}); in fetch()
120 return hlfir::loadTrivialScalar(loc, builder, tempElement); in fetch()
123 void fir::factory::HomogeneousScalarStack::destroy(mlir::Location loc, in destroy() argument
128 builder.create<fir::FreeMemOp>(loc, declare.getMemref()); in destroy()
133 mlir::Location loc, fir::FirOpBuilder &builder) { in moveStackAsArrayExpr() argument
134 mlir::Value mustFree = builder.createBool(loc, allocateOnHeap); in moveStackAsArrayExpr()
135 auto hlfirExpr = builder.create<hlfir::AsExprOp>(loc, temp, mustFree); in moveStackAsArrayExpr()
143 fir::factory::SimpleCopy::SimpleCopy(mlir::Location loc, in SimpleCopy() argument
150 source = hlfir::Entity{builder.create<hlfir::AsExprOp>(loc, source)}; in SimpleCopy()
151 copy = hlfir::genAssociateExpr(loc, builder, source, in SimpleCopy()
155 void fir::factory::SimpleCopy::destroy(mlir::Location loc, in destroy() argument
157 builder.create<hlfir::EndAssociateOp>(loc, copy); in destroy()
164 fir::factory::AnyValueStack::AnyValueStack(mlir::Location loc, in AnyValueStack() argument
168 counter{loc, builder,
169 builder.createIntegerConstant(loc, builder.getI64Type(), 0),
171 opaquePtr = fir::runtime::genCreateValueStack(loc, builder);
187 retValueBox = builder.createTemporary(loc, boxType);
190 void fir::factory::AnyValueStack::pushValue(mlir::Location loc, in pushValue() argument
197 hlfir::convertToBox(loc, builder, entity, storageElementType); in pushValue()
198 fir::runtime::genPushValue(loc, builder, opaquePtr, fir::getBase(box)); in pushValue()
204 mlir::Location loc, fir::FirOpBuilder &builder) { in resetFetchPosition() argument
205 counter.reset(loc, builder); in resetFetchPosition()
208 mlir::Value fir::factory::AnyValueStack::fetch(mlir::Location loc, in fetch() argument
210 mlir::Value indexValue = counter.getAndIncrementIndex(loc, builder); in fetch()
211 fir::runtime::genValueAt(loc, builder, opaquePtr, indexValue, retValueBox); in fetch()
215 hlfir::loadTrivialScalar(loc, builder, hlfir::Entity{retValueBox}); in fetch()
220 return builder.createConvert(loc, valueStaticType, result); in fetch()
231 void fir::factory::AnyValueStack::destroy(mlir::Location loc, in destroy() argument
233 fir::runtime::genDestroyValueStack(loc, builder, opaquePtr); in destroy()
240 fir::factory::AnyVariableStack::AnyVariableStack(mlir::Location loc, in AnyVariableStack() argument
244 counter{loc, builder,
245 builder.createIntegerConstant(loc, builder.getI64Type(), 0),
247 opaquePtr = fir::runtime::genCreateDescriptorStack(loc, builder);
256 retValueBox = builder.createTemporary(loc, boxType);
259 void fir::factory::AnyVariableStack::pushValue(mlir::Location loc, in pushValue() argument
266 hlfir::convertToBox(loc, builder, entity, storageElementType); in pushValue()
267 fir::runtime::genPushDescriptor(loc, builder, opaquePtr, fir::getBase(box)); in pushValue()
273 mlir::Location loc, fir::FirOpBuilder &builder) { in resetFetchPosition() argument
274 counter.reset(loc, builder); in resetFetchPosition()
277 mlir::Value fir::factory::AnyVariableStack::fetch(mlir::Location loc, in fetch() argument
279 mlir::Value indexValue = counter.getAndIncrementIndex(loc, builder); in fetch()
280 fir::runtime::genDescriptorAt(loc, builder, opaquePtr, indexValue, in fetch()
282 hlfir::Entity retBox{builder.create<fir::LoadOp>(loc, retValueBox)}; in fetch()
287 return builder.createConvert(loc, variableStaticType, retBox); in fetch()
289 return hlfir::genVariableBoxChar(loc, builder, retBox); in fetch()
290 mlir::Value rawAddr = genVariableRawAddress(loc, builder, retBox); in fetch()
291 return builder.createConvert(loc, variableStaticType, rawAddr); in fetch()
294 void fir::factory::AnyVariableStack::destroy(mlir::Location loc, in destroy() argument
296 fir::runtime::genDestroyDescriptorStack(loc, builder, opaquePtr); in destroy()
304 mlir::Location loc, fir::FirOpBuilder &builder, in AnyVectorSubscriptStack() argument
306 : AnyVariableStack{loc, builder, variableStaticType} { in AnyVectorSubscriptStack()
318 std::make_unique<TemporaryStorage>(AnyVariableStack{loc, builder, type});
322 mlir::Location loc, fir::FirOpBuilder &builder, mlir::Value shape) { in pushShape() argument
327 mlir::Value null = builder.createNullConstant(loc, refType); in pushShape()
329 builder.create<fir::EmboxOp>(loc, *boxType, null, shape); in pushShape()
330 shapeTemp->pushValue(loc, builder, descriptor); in pushShape()
334 shapeTemp->cast<SSARegister>().pushValue(loc, builder, shape); in pushShape()
338 mlir::Location loc, fir::FirOpBuilder &builder) { in resetFetchPosition() argument
339 static_cast<AnyVariableStack *>(this)->resetFetchPosition(loc, builder); in resetFetchPosition()
340 shapeTemp->resetFetchPosition(loc, builder); in resetFetchPosition()
344 fir::factory::AnyVectorSubscriptStack::fetchShape(mlir::Location loc, in fetchShape() argument
347 hlfir::Entity descriptor{shapeTemp->fetch(loc, builder)}; in fetchShape()
348 return hlfir::genShape(loc, builder, descriptor); in fetchShape()
350 return shapeTemp->cast<SSARegister>().fetch(loc, builder); in fetchShape()
354 mlir::Location loc, fir::FirOpBuilder &builder) { in destroy() argument
355 static_cast<AnyVariableStack *>(this)->destroy(loc, builder); in destroy()
356 shapeTemp->destroy(loc, builder); in destroy()