The Transform dialect uses the side effect modeling mechanism to record the
effects of the transform ops on the mapping between Transform IR values and
Payload IR ops. Introduce a checker pass that warns if a Transform IR value is
used after it has been freed (consumed). This pass is mostly intended as a
debugging aid in addition to the verification/assertion mechanisms in the
transform interpreter. It reports all potential use-after-free situations.
The implementation makes a series of simplifying assumptions to be simple and
conservative. A more advanced implementation would rely on the data flow-like
analysis associated with a side-effect resource rather than a value, which is
currently not supported by the analysis infrastructure.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Dialect/Transform/IR/TransformOps.td | ||
---|---|---|
52–54 | I've seen code that simply uses DeclareOpInterfaceMethods<RegionBranchOpInterface>, so maybe it even works without explicitly listing all interface methods. | |
mlir/include/mlir/Dialect/Transform/Transforms/Passes.td | ||
18 | typo | |
29 | typo | |
mlir/lib/Dialect/Transform/IR/TransformOps.cpp | ||
297 | should this be operand_begin? | |
318 | is this needed? |
mlir/include/mlir/Dialect/Transform/IR/TransformOps.td | ||
---|---|---|
52–54 | This makes the generator emit declarations for methods that have the default implementation, also signaling the reader that these methods will be reimplemented. Without listing them, no declaration will be emitted and the code will fail to compile. | |
mlir/lib/Dialect/Transform/IR/TransformOps.cpp | ||
297 | No, we want to return an empty range. | |
318 | Yes, otherwise we may get an unused argument warning. |
I've seen code that simply uses DeclareOpInterfaceMethods<RegionBranchOpInterface>, so maybe it even works without explicitly listing all interface methods.