llvm-project
95fdfcca - [CIR] Move BrOp block merging to canonicalize method (#178053)

Commit
95 days ago
[CIR] Move BrOp block merging to canonicalize method (#178053) Move the redundant branch removal pattern from CIRCanonicalize pass to BrOp::canonicalize. This follows MLIR's convention where canonicalization logic lives with the operation definition. Changes: - Add hasCanonicalizeMethod to BrOp in CIROps.td - Implement BrOp::canonicalize in CIRDialect.cpp - Auto-collect canonicalization patterns from all registered ops in CIRCanonicalizePass (matching MLIR's Canonicalizer approach) - Remove the standalone RemoveRedundantBranches pattern class Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Author
Parents
Loading