[Mlir-commits] [flang] [mlir] [openmp] [MLIR][OpenMP] Add scan reduction lowering to llvm (PR #167031)
Kareem Ergawy
llvmlistbot at llvm.org
Thu Nov 27 03:30:50 PST 2025
================
@@ -77,14 +78,38 @@ class OpenMPAllocaStackFrame
llvm::OpenMPIRBuilder::InsertPointTy allocaInsertPoint;
};
+/// ModuleTranslation stack frame for OpenMP operations. This keeps track of the
+/// insertion points for allocas of parent of the current parallel region. The
+/// insertion point is used to allocate variables to be shared by the threads
+/// executing the parallel region. Lowering of scan reduction requires declaring
+/// shared pointers to the temporary buffer to perform scan reduction.
+class OpenMPParallelAllocaStackFrame
----------------
ergawy wrote:
Instead of adding a new type, maybe we can extend `OpenMPAllocaStackFrame` with a `bool isParallelOp` field (or even the type of the op at the time of the stack-frame save). Then we can use the new field as a condition to interrupt or advance the stack-walk.
https://github.com/llvm/llvm-project/pull/167031
More information about the Mlir-commits
mailing list