[mlir][Tensor] Disallow negative dimensions in verifier of tensor.generate
Instead of refusing to transform negative dimensions, the compiler will now crash
which is probably the right thing to do. Thanks to Alex Zinenko for pointing this out.
Thank you! Please run clang-format.
I'll mark this as "changes requested" so I don't forget to get back to this.
It is usually undesirable to return SmallVector as it may copy a lot. Instead, you can pass a SmallVectorImpl<...> & into the function.
Please declare auxiliary functions as static and document them.
Nit: do not specify the number of stack-allocated vector elements unless there is a strong reason to pick a number, just SmallVector<Value> will do here.
Please expand auto to be the proper type unless the type is obvious from local context (e.g., the RHS has a cast) or difficult/impossible to spell (iterators, lambdas).