[PATCH] D79833: [mlir][shape] Add `shape.from_extents`.
Sean Silva via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 19 14:53:47 PDT 2020
silvas added inline comments.
================
Comment at: mlir/lib/Dialect/Shape/IR/Shape.cpp:193
+ SmallVectorImpl<Type> &inferredReturnTypes) {
+ inferredReturnTypes.push_back(ShapeType::get(context));
+ return success();
----------------
jpienaar wrote:
> 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]
I want to avoid that because I specifically want to make this ugly to show the hole in the infra (and eventually make myself fix it :) ). If all result types are buildable types then this should be autogenerated somehow. (as a stretch goal unifying with the type inference logic used by the declarative asm parser)
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