[flang] [llvm] [Flang][OpenMP] Fix allocating arrays with size intrinisic (PR #119226)
Sergio Afonso via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 11 06:27:42 PST 2024
================
@@ -922,32 +922,70 @@ static void genBodyOfTargetOp(
while (!valuesDefinedAbove.empty()) {
for (mlir::Value val : valuesDefinedAbove) {
mlir::Operation *valOp = val.getDefiningOp();
- if (mlir::isMemoryEffectFree(valOp)) {
+ assert(valOp != nullptr);
+
+ // NOTE: We skip BoxDimsOp's as the lesser of two evils is to map the
+ // indices separately, as the alternative is to eventually map the Box,
+ // which comes with a fairly large overhead comparatively. We could be
+ // more robust about this and check using a BackWardsSlice to see if we
----------------
skatrak wrote:
```suggestion
// more robust about this and check using a BackwardsSlice to see if we
```
https://github.com/llvm/llvm-project/pull/119226
More information about the llvm-commits
mailing list