Skip to content

Commit

Permalink
handle some review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ergawy committed Aug 2, 2024
1 parent 260f30f commit 4c3d9f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions flang/lib/Optimizer/Transforms/DoConcurrentConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ void collectIndirectConstOpChain(mlir::Operation *link,
opChain.insert(link);
}

/// Loop \p innerLoop is considered perfectly-nested inside \p outerLoop iff the
/// only operations in \p outerloop's region are:
/// Loop \p innerLoop is considered perfectly-nested inside \p outerLoop iff
/// there are no operations in \p outerloop's other than:
///
/// 1. those operations needed to setup \p innerLoop's LB, UB, and step values,
/// 2. the operations needed to assing/update \p outerLoop's induction variable.
Expand Down Expand Up @@ -342,8 +342,8 @@ bool isPerfectlyNested(fir::DoLoopOp outerLoop, fir::DoLoopOp innerLoop) {
forwardSliceOptions);

// If any of the bounds is computed using a somewhat elaborate expression, we
// might have to allocate temproaries within the loop-nest. For example,
// `foo(m*n, m/n)` would allocate memory for the results of the restuls of
// might have to allocate temporaries within the loop-nest. For example,
// `foo(m*n, m/n)` would allocate memory for the results of the resutls of
// `m*n` and `m/n` inside the loop and pass the results to `foo`.
//
// The mem alloc ops for these temp values will be part of the backward slices
Expand Down
4 changes: 3 additions & 1 deletion flang/test/Transforms/DoConcurrent/loop_nest_test.f90
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
! Tests loop-nest detection algorithm for do-concurrent mapping.

! REQUIRES: asserts

! RUN: %flang_fc1 -emit-hlfir -fopenmp -fdo-concurrent-parallel=host \
! RUN: -mmlir -debug %s -o - &> %t.log || true
! RUN: -mmlir -debug %s -o - 2> %t.log || true

! RUN: FileCheck %s < %t.log

Expand Down

0 comments on commit 4c3d9f1

Please sign in to comment.