[Mlir-commits] [llvm] [mlir] [mlir] `HasParallelRegion` means region may be parallel (PR #231372)
Federico Bruzzone
llvmlistbot at llvm.org
Mon Oct 12 23:57:28 PDT 2026
================
@@ -35,10 +35,12 @@ LogicalResult verifyLoopLikeOpInterface(Operation *op);
//===----------------------------------------------------------------------===//
namespace OpTrait {
-// A trait indicating that the single region contained in the operation has
-// parallel execution semantics. This may have implications in a certain pass.
-// For example, buffer hoisting is illegal in parallel loops, and local buffers
-// may be accessed by parallel threads simultaneously.
+// A trait indicating that the single region contained in the operation may have
+// parallel execution semantics. Whether it executes in parallel may depend on
+// the operation's attributes or enclosing context. Transformations must account
+// for possible parallel execution unless they can prove sequential execution.
+// For example, hoisting a buffer allocation out of the region may cause parallel
+// executions to share a buffer that was previously private.
template <typename ConcreteType>
----------------
FedericoBruzzone wrote:
> This trait could be turned into an op interface in the future.
Could we document this fact in the comment, e.g., as a TODO? It would allow us to keep track.
https://github.com/llvm/llvm-project/pull/231372
More information about the Mlir-commits
mailing list