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

Jacques Pienaar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 20 17:40:54 PDT 2020


jpienaar accepted this revision.
jpienaar added inline comments.
This revision is now accepted and ready to land.


================
Comment at: mlir/lib/Dialect/Shape/IR/Shape.cpp:302
+                                           MLIRContext *context) {
+  // If equal, return true op
+  patterns.insert<ConstCstrEq>(context);
----------------
I think we are using true and successful witness interchangeably, should we  just pick one? 


================
Comment at: mlir/lib/Dialect/Shape/IR/ShapeCanonicalization.td:11
+def AllInputShapesEq : Constraint<CPred< [{
+        llvm::all_of($0.getOwner()->getOperands(), [&](mlir::Value val) {
+          auto baseCase = $0.getOwner()->getOperand(0).getDefiningOp<mlir::shape::ConstShapeOp>();
----------------
Same comments re-formatting.


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