Add RemoveSubsequentEquivalentCtrl Canonicalization Pattern#1686
Add RemoveSubsequentEquivalentCtrl Canonicalization Pattern#1686MatthiasReumann wants to merge 5 commits intomainfrom
RemoveSubsequentEquivalentCtrl Canonicalization Pattern#1686Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Just a brief comment here: We should really consider lifting the constraint that Ctrl modifiers (and modifiers in general) must only contain a single unitary operation. If we would allow multiple operations in a modifier, then we would get this optimization basically for free based on the current canonicalization and a canonicalization that pulls together separate CtrlOp with shared controls. |
I haven't thought it through thoroughly, but this sounds very reasonable - at least for the optimization introduced in this pull request. |
Description
This pull request add a
RemoveSubsequentEquivalentCtrlpattern to the canonicalization of theCtrlOp, which is currently not implemented.This pattern will probably also be used in the "Writing Your First Optimization Pass" section in the Getting Started guide. (#1555)
Checklist
If PR contains AI-assisted content:
Assisted-by: [Model Name] via [Tool Name]footer.