[all-commits] [llvm/llvm-project] 8e0a63: [mlir][docs] Add docs on canonicalizers being fold...
Kunwar Grover via All-commits
all-commits at lists.llvm.org
Thu Mar 6 00:42:09 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8e0a63ddad26c26501a7d9639b470665afadcf40
https://github.com/llvm/llvm-project/commit/8e0a63ddad26c26501a7d9639b470665afadcf40
Author: Kunwar Grover <groverkss at gmail.com>
Date: 2025-03-06 (Thu, 06 Mar 2025)
Changed paths:
M mlir/docs/Canonicalization.md
Log Message:
-----------
[mlir][docs] Add docs on canonicalizers being folders or patterns (#129517)
If a transformation should be a canonicalization is an orthogonal
question to if a transformation should be implemented as a
`RewritePattern` or a `fold` method. The later is an implementation
detail.
This patch adds a suggestion to always implement a canonicalization as a
`fold` pattern if possible, as they are a restricted subset of a
`RewritePattern`.
This has been a common source of confusion, as to when to implement a
canonicalization as a fold method or a RewritePattern.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list