Add canonicalizers to subtensor_insert operations need canonicalizers
that propagate the constant arguments within offsets, sizes and
strides. Also add pattern to propogate tensor_cast operations.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/StandardOps/IR/Ops.cpp | ||
---|---|---|
3310 | Why do you need this method? |
mlir/lib/Dialect/StandardOps/IR/Ops.cpp | ||
---|---|---|
3310 | It is used in SubTensorInsertOpCastFolder below. When you output type changes, this adds the cast so that replacement works fine. The cast is canonicalized away later. |
mlir/lib/Dialect/StandardOps/IR/Ops.cpp | ||
---|---|---|
3310 | Why do you need a new function for that? That is what I meant. This looks like something that would just be inlined into the pattern. |
Remove unneeded method.
mlir/lib/Dialect/StandardOps/IR/Ops.cpp | ||
---|---|---|
3310 | Fair enough. I just copied what was done for subtensor and subview above. But that was done since those two ops use the same template method. Removed this. |
mlir/lib/Dialect/StandardOps/IR/Ops.cpp | ||
---|---|---|
3310 | At least I thought I did. Let me reupload. |
clang-tidy: warning: unused function 'replaceWithNewOp' [clang-diagnostic-unused-function]
not useful