[PATCH] D72432: [mlir] Add shaped container component type interface
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 20:37:08 PST 2020
rriddle accepted this revision.
rriddle added inline comments.
This revision is now accepted and ready to land.
================
Comment at: mlir/include/mlir/Analysis/InferTypeOpInterface.h:22
+#include "mlir/IR/StandardTypes.h"
#include "mlir/IR/Types.h"
#include "mlir/Support/LLVM.h"
----------------
rriddle wrote:
> Can you remove Types.h now? Some of the others could also be trimmed a bit as well.
I would think that OpDefinition gives you the rest of these headers already.
================
Comment at: mlir/test/lib/TestDialect/TestOps.td:403
+def InferTensorType : NativeOpTrait<"InferTensorType">;
+def OpWithShapedTypeInferTypeInterfaceOp : TEST_Op<"op_with_shaped_type_infer_type_if",
+ [
----------------
Is this wrapped at 80 characters?
================
Comment at: mlir/test/lib/TestDialect/TestPatterns.cpp:108
+ // TODO: Move to ops that implement type infer interface.
+ getFunction().walk([this](Operation *op) -> void {
+ auto retTypeFn = dyn_cast<InferTypeOpInterface>(op);
----------------
can you do:
.walk[this](InferTypeOpInterface retTypeFn) {
Operation *op = retTypeFn.getOperation();
});
?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72432/new/
https://reviews.llvm.org/D72432
More information about the llvm-commits
mailing list