[Mlir-commits] [mlir] [mlir] Improve `GreedyPatternRewriteDriver` and pass documentation (PR #77614)
Mehdi Amini
llvmlistbot at llvm.org
Wed Jan 10 12:05:09 PST 2024
================
@@ -23,16 +23,21 @@ further below. All passes in MLIR derive from `OperationPass` and adhere to the
following restrictions; any noncompliance will lead to problematic behavior in
multithreaded and other advanced scenarios:
-* Must not modify any state referenced or relied upon outside the current
- operation being operated on. This includes adding or removing operations
- from the parent block, changing the attributes(depending on the contract
- of the current operation)/operands/results/successors of the current operation.
-* Must not modify the state of another operation not nested within the current
- operation being operated on.
- * Other threads may be operating on these operations simultaneously.
-* Must not inspect the state of sibling operations.
+* Must not inspect the state of operations that are siblings of the operation
+ that the pass operates on. Must neither access operations nested under those
+ siblings.
* Other threads may be modifying these operations in parallel.
* Inspecting the state of ancestor/parent operations is permitted.
+* Must not modify the state of operations other than the operation that the
+ pass operates on ("current operation") and its nested operations. This
+ includes adding, modifying or removing other operations from an ancestor
+ block.
+ * Other threads may be operating on these operations simultaneously.
+ * The attributes of the current operation may be modified freely.
+ * The operands of the current operation may be modified, as long as no
----------------
joker-eph wrote:
You can't touch operands, this would race in the parent block.
https://github.com/llvm/llvm-project/pull/77614
More information about the Mlir-commits
mailing list