[Mlir-commits] [mlir] 6da5945 - [MLIR][docs] Clarify language in pass restrictions
Geoffrey Martin-Noble
llvmlistbot at llvm.org
Tue Sep 7 13:41:10 PDT 2021
Author: Geoffrey Martin-Noble
Date: 2021-09-07T13:40:55-07:00
New Revision: 6da594596b8f4b9bfac136e484e7de5ca335c945
URL: https://github.com/llvm/llvm-project/commit/6da594596b8f4b9bfac136e484e7de5ca335c945
DIFF: https://github.com/llvm/llvm-project/commit/6da594596b8f4b9bfac136e484e7de5ca335c945.diff
LOG: [MLIR][docs] Clarify language in pass restrictions
Right now all but the last bullet are relying on applied "must not" that
isn't there and the last bullet is a "must".
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D109389
Added:
Modified:
mlir/docs/PassManagement.md
Removed:
################################################################################
diff --git a/mlir/docs/PassManagement.md b/mlir/docs/PassManagement.md
index dcae3e8dbd0c2..5d76af195d19f 100644
--- a/mlir/docs/PassManagement.md
+++ b/mlir/docs/PassManagement.md
@@ -23,24 +23,25 @@ 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:
-* Modify any state referenced or relied upon outside the current 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.
-* Modify the state of another operation not nested within the current
+* Must not modify any state referenced or relied upon outside the current
+ 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.
-* Inspect the state of sibling operations.
+* Must not inspect the state of sibling operations.
* Other threads may be modifying these operations in parallel.
* Inspecting the state of ancestor/parent operations is permitted.
-* Maintain mutable pass state across invocations of `runOnOperation`. A pass
- may be run on many
diff erent operations with no guarantee of execution
- order.
+* Must not maintain mutable pass state across invocations of `runOnOperation`.
+ A pass may be run on many
diff erent operations with no guarantee of
+ execution order.
* When multithreading, a specific pass instance may not even execute on
all operations within the IR. As such, a pass should not rely on running
on all operations.
-* Maintain any global mutable state, e.g. static variables within the source
- file. All mutable state should be maintained by an instance of the pass.
+* Must not maintain any global mutable state, e.g. static variables within the
+ source file. All mutable state should be maintained by an instance of the
+ pass.
* Must be copy-constructible
* Multiple instances of the pass may be created by the pass manager to
process operations in parallel.
More information about the Mlir-commits
mailing list