[flang-commits] [flang] [flang][MLIR][OpenMP] Extend delayed privatization for arrays and characters (PR #85023)
via flang-commits
flang-commits at lists.llvm.org
Fri May 3 07:23:33 PDT 2024
================
@@ -1439,13 +1439,18 @@ genParallelOp(Fortran::lower::AbstractConverter &converter,
reductionSyms;
allSymbols.append(privateSyms);
for (auto [arg, prv] : llvm::zip_equal(allSymbols, region.getArguments())) {
- converter.bindSymbol(*arg, prv);
+ fir::ExtendedValue hostExV = converter.getSymbolExtendedValue(*arg);
+ converter.bindSymbol(*arg, hlfir::translateToExtendedValue(
+ loc, firOpBuilder, hlfir::Entity{prv},
+ /*contiguousHint=*/
+ std::holds_alternative<fir::ArrayBoxValue>(
----------------
jeanPerier wrote:
You could also use `Fortran::evaluate::IsSimplyContiguous(*arg, converter.getFoldingContext())`. It is more generic (will cover the character array case for instance) and more expressive, and it removes the need of calling `getSymbolExtendedValue` that could generate useless code.
https://github.com/llvm/llvm-project/pull/85023
More information about the flang-commits
mailing list