[llvm-branch-commits] [flang] [flang][OpenMP] Map simple `do concurrent` loops to OpenMP host constructs (PR #127633)
Sergio Afonso via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Mar 12 07:36:41 PDT 2025
================
@@ -24,7 +25,67 @@ namespace flangomp {
namespace {
namespace looputils {
-using LoopNest = llvm::SetVector<fir::DoLoopOp>;
+/// Stores info needed about the induction/iteration variable for each `do
+/// concurrent` in a loop nest.
+struct InductionVariableInfo {
+ /// The operation allocating memory for iteration variable.
+ mlir::Operation *iterVarMemDef;
+};
+
+using LoopNestToIndVarMap =
+ llvm::MapVector<fir::DoLoopOp, InductionVariableInfo>;
+
+/// For the \p doLoop parameter, find the operation that declares its iteration
+/// variable or allocates memory for it.
+///
+/// For example, give the following loop:
----------------
skatrak wrote:
```suggestion
/// For example, given the following loop:
```
https://github.com/llvm/llvm-project/pull/127633
More information about the llvm-branch-commits
mailing list