[PATCH] D80303: [mlir] Canonicaliztion of shape.cstr_eq

Sean Silva via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 20 12:02:46 PDT 2020


silvas accepted this revision.
silvas added a comment.

LGTM, but please look into making these be folds instead of canonicalization patterns. That should also make the code simpler since the folding infra will give you the folded attributes pre-canned without having to do as much getDefiningOp<ConstShapeOp>().



================
Comment at: mlir/lib/Dialect/Shape/IR/ShapeCanonicalization.td:23
+
+def ConstCstrEq : Pat<(Shape_CstrEqOp:$op $shapes),
+          (Shape_TrueWitnessOp),
----------------
This is technically a fold, right?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80303/new/

https://reviews.llvm.org/D80303





More information about the llvm-commits mailing list