- Generic visitors invoke operation callbacks before/in-between/after visiting the regions attached to an operation and use a WalkStage to indicate which regions have been visited.
- This can be useful for cases where we need to visit the operation in between visiting the regions attached to the operation. END_PUBLIC
Details
- Reviewers
rriddle dcaballe mehdi_amini - Commits
- rG8067ced144a2: [MLIR] Introduce generic visitors.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/IR/Operation.h | ||
---|---|---|
526 | Missing the walk stage parameter here it seems. | |
mlir/include/mlir/IR/Visitors.h | ||
77 | Drop the mlir:: | |
79–84 | Functions should be camelCase. | |
87–88 | Variables should be camelCase. | |
101–114 | Use llvm::function_traits instead. | |
265 | Drop the mlir on all of these. | |
267 | Drop the llvm:: | |
284 | Drop the llvm:: | |
mlir/lib/IR/Visitors.cpp | ||
77–83 | nit: Drop the auto on these, |
mlir/include/mlir/IR/Visitors.h | ||
---|---|---|
242–255 | I'd think the WalkOrder parameter does not make sense for generic visitors since the visit is a combination of pre/in/post order. |
mlir/include/mlir/IR/Visitors.h | ||
---|---|---|
79 | Yeah, some places seem to use "Returns if the current range is empty." and others "Returns true if the operation has been registered, i.e. if the". I agree that "Returns true if" is easier to read, will update. |
Missing the walk stage parameter here it seems.