Lines Matching +defs:temp +defs:buffer
89 "array-constructor-initial-buffer-size",
91 "set the incremental array construction buffer size (default=32)"),
378 mlir::Value temp = builder.createTemporary(
381 builder.create<fir::StoreOp>(loc, val, temp);
382 return fir::substBase(exv, temp);
395 fir::ExtendedValue temp = builder.createTemporary(loc, type);
396 fir::factory::genScalarAssignment(builder, loc, temp, exv);
397 return temp;
693 /// Lower `expr` to be passed as a fir.box argument. Do not create a temp
1241 fir::CharBoxValue temp = charHelper.createCharacterTemp(
1243 charHelper.createAssign(temp, lhs);
1244 return fir::ExtendedValue{temp};
2076 mlir::Value temp = builder.create<fir::AllocMemOp>(
2079 return fir::CharArrayBoxValue{temp, charLen, extents};
2080 return fir::ArrayBoxValue{temp, extents};
2106 // In general, genExtAddr might not create a temp for variable inside
2128 mlir::Value temp = builder.createTemporary(loc, value.getType());
2129 builder.create<fir::StoreOp>(loc, value, temp);
2130 return temp;
2140 // TODO: polymorphic aspects should be kept but for now the temp
2145 mlir::Value temp = builder.createTemporary(loc, value.getType());
2146 builder.create<fir::StoreOp>(loc, value, temp);
2147 return temp;
2158 /// argument into a contiguous temp. It is used to deallocate the temp that
2159 /// may have been created as well as to the copy-out from the temp to the
2163 ExtValue temp;
2168 // the copy-out and temp deallocation.
2185 /// Generate a contiguous temp to pass \p actualArg as argument \p arg. The
2186 /// creation of the temp and copy-in can be made conditional at runtime by
2188 /// the temp and copy will only be made if the value is true at runtime).
2209 ExtValue temp = genArrayTempFromMold(actualArg, tempName);
2224 // We have to initialize the temp if it may have components
2227 if (mlir::isa<fir::RecordType>(getElementTypeOf(temp))) {
2228 mlir::Value tempBox = fir::getBase(builder.createBox(loc, temp));
2231 return temp;
2234 genArrayCopy(temp, actualArg);
2235 return temp;
2243 mlir::Value destBox = fir::getBase(builder.createBox(loc, temp));
2248 return temp;
2282 ExtValue temp = doCopyIn();
2283 builder.create<fir::ResultOp>(loc, fir::getBase(temp));
2286 fir::ExtendedValue temp =
2290 CopyOutPair{actualArg, temp, doCopyOut, restrictCopyAtRuntime});
2291 return temp;
2294 ExtValue temp = doCopyIn();
2295 copyOutPairs.emplace_back(CopyOutPair{actualArg, temp, doCopyOut, {}});
2296 return temp;
2314 ExtValue temp = doCopyIn();
2316 fir::getBase(temp));
2321 ExtValue temp = doCopyIn();
2322 builder.create<fir::ResultOp>(loc, fir::getBase(temp));
2330 // Associate the temp address with actualArg lengths and extents if a
2332 fir::ExtendedValue temp = fir::substBase(readIfBoxValue(actualArg), addr);
2335 CopyOutPair{actualArg, temp, doCopyOut, restrictCopyAtRuntime});
2336 return temp;
2340 /// has been copied-in into a contiguous temp.
2348 genArrayCopy(copyOutPair.var, copyOutPair.temp);
2350 fir::getElementTypeOf(copyOutPair.temp))) {
2355 fir::getBase(builder.createBox(loc, copyOutPair.temp));
2360 builder.create<fir::FreeMemOp>(loc, fir::getBase(copyOutPair.temp));
2372 // Create allocatable descriptor for the temp so that the runtime may
2375 fir::getBase(builder.createBox(loc, copyOutPair.temp));
2420 // not do a copy-in/copy-out because the temp address, even though
2448 /// Create a temp on the stack for scalar actual arguments that may be absent
2449 /// at runtime, but must be passed via a temp if they are presents.
2461 mlir::Value temp =
2466 return fir::CharBoxValue{temp, len};
2484 /// the creation of the temp if the actual is a variable and \p byValue is
2529 // Scalars, create a temp, and use it conditionally at runtime if
2531 ExtValue temp =
2533 mlir::Type tempAddrTy = fir::getBase(temp).getType();
2539 fir::factory::genScalarAssignment(builder, loc, temp,
2541 builder.create<fir::ResultOp>(loc, fir::getBase(temp));
2549 return {fir::substBase(temp, selectAddr), isPresent};
2604 // List of <var, temp> where temp must be copied into var after the call.
2992 // an array temp.
3140 mlir::Value temp = builder.createTemporary(loc, argBaseType);
3141 builder.create<fir::StoreOp>(loc, from, temp);
3142 from = temp;
3575 /// Lower the expression \p expr into a buffer that is created on demand. The
3576 /// variable containing the pointer to the buffer is \p var and the variable
3577 /// containing the shape of the buffer is \p shapeBuffer.
3586 // following continuation creates the buffer as needed.
3612 // to the lazy allocated buffer.
4218 /// Rebind the lazy buffer variable, etc. as we go.
4297 // Allocate the mask buffer lazily.
4316 // Set buffer from the header.
4321 // Index into the ragged buffer to retrieve cached results.
4337 // Address of ragged buffer data.
4356 // Construct shape of buffer.
4460 // Recover the cached condition from the mask buffer.
4518 TODO(loc, "character array expression temp with dynamic length");
4521 TODO(loc, "derived type array expression temp with LEN parameters");
4524 TODO(loc, "creating an array temp where the element type has "
4526 mlir::Value temp = !seqTy.hasDynamicExtents()
4532 [bldr, loc, temp]() { bldr->create<fir::FreeMemOp>(loc, temp); });
4534 return builder.create<fir::ArrayLoadOp>(loc, seqTy, temp, shapeOp,
4820 // Store scalar value in a temp to fulfill VALUE attribute.
4822 mlir::Value temp =
4826 builder.create<fir::StoreOp>(loc, val, temp);
4828 [=](IterSpace iters) -> ExtValue { return temp; });
5091 // Converting a value of memory bound type requires creating a temp and
5350 fir::CharBoxValue temp =
5357 .createAssign(temp, lf(iters));
5358 return temp;
5940 mlir::Value temp =
5944 builder.create<fir::StoreOp>(loc, base, temp);
5946 builder, loc, extMemref, temp, slice);
6200 // Construct code to check for a buffer overrun and realloc the buffer when
6213 // Not enough space, resize the buffer.
6231 // Otherwise, just forward the buffer.
6299 // Grow the buffer as needed.
6303 // Copy the elements to the buffer.
6313 // Save the incremented buffer position.
6317 // Copy a trivial scalar value into the buffer.
6319 // Increment the buffer position.
6322 // Grow the buffer as needed.
6325 // Store the element in the buffer.
6345 auto buffer = v.getBuffer();
6346 if (fir::isa_char(buffer.getType())) {
6349 // Increment the buffer position.
6352 // Grow the buffer as needed.
6355 // Store the element in the buffer.
6461 // determine that all the buffer overrun tests are false when the
6480 // creating the buffer until after the expression is evaluated.
6502 // Populate the buffer with the elements, growing as necessary.
7249 /// Array appears in a lhs (or temp) context such that a projected,