[PATCH] D79833: [mlir][shape] Add `shape.from_extents`.

Jacques Pienaar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 19 09:49:17 PDT 2020


jpienaar accepted this revision.
jpienaar marked an inline comment as done.
jpienaar added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: jurahul.

Thanks



================
Comment at: mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td:113
+    ]> {
+  let summary = "Creates a shape from extents.";
+  let description = [{
----------------
No period at the end please (summary is sentence fragment)


================
Comment at: mlir/lib/Dialect/Shape/IR/Shape.cpp:193
+    SmallVectorImpl<Type> &inferredReturnTypes) {
+  inferredReturnTypes.push_back(ShapeType::get(context));
+  return success();
----------------
Seems like we could just have constantShapeReturn function which all the inferReturnType could call [I did a version where it was "trait" that reduced a lot of repetition which I should perhaps clean up a bit - doesn't add anything truly new, just packages]


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79833





More information about the llvm-commits mailing list