This revision adds foldings for ExtractOp operations that come from previous InsertOp.
InsertOp have cumulative semantic where multiple chained inserts are necessary to produce the final value from which the extracts are obtained.
Additionally, TransposeOp may be interleaved and need to be tracked in order to follow the producer consumer relationships and properly compute positions.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
nice to cleanup the IR in between!
mlir/lib/Dialect/Vector/VectorOps.cpp | ||
---|---|---|
651 | at first glance, i was wondering why it is okay to keep going on insert operations, but then i realized that you either insert in exactly the same position, or otherwise a necessarily different position (very specific to InsertOp, where all subscripts are constant) I feel you need to document this a bit more for clarity.... | |
mlir/lib/IR/AffineMap.cpp | ||
366 | I would add this to the method documentation (if more are requested than available...), since it may be unexpected to get a map back with size < numResults |
Two comments, but good to go after that.
mlir/include/mlir/IR/AffineMap.h | ||
---|---|---|
185 | typo: tihs -> this | |
mlir/lib/Dialect/Vector/VectorOps.cpp | ||
590 | nit: now that you have the continue, you no longer need this conditionally assigned "candidate", but can just push the transposeOp.vector() and insertOp.dest() into the branches below... |
typo: tihs -> this