[PATCH] D73295: [mlir] [VectorOps] Rewriting of vector.extract/insert_slices to other vector ops
Nicolas Vasilache via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 24 14:09:06 PST 2020
nicolasvasilache added a comment.
Well my point here is that if you added the patterns to fold the tuples, you would do as good a job as you could in the absence of region/function boundaries.
Here you created an example that leaks in an unfixable way (because we have conciously decided to no lower the tuple<vector> type to LLVMIR and take the strong position that it must canonicalize/fold/DCE away).
Really the only thing I am trying to get is to either have:
1. the pattern collection be this:
void mlir::vector::populateVectorSlicesLoweringPatterns(
OwningRewritePatternList &patterns, MLIRContext *context) {
patterns.insert<ExtractSlicesOpLowering, InsertSlicesOpLowering, TupleGetFolderOp, OtherRelevantTuplePatterns>(context);
}
2. a good justification why that would be a bad idea.
The outcome I am looking for is an API that makes is easy and unsurprising to add patterns that guarantee Slices are lowered away (and it should be a "compiler bug" if they are remaining).
All this because we refuse to have a representation for `tuple<vector<4x8x16x32xf32>.... >` in LLVMIR (unless strong data comes to suggest this inuition is wrong).
Does this make sense?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73295/new/
https://reviews.llvm.org/D73295
More information about the llvm-commits
mailing list