This diff adds support for linalg.reshape which takes a view and collapses
its dimensions according to a reassociation list of maps to return a new view.
This is a pure metadata operation which does not allocate or copy.
In the general case, such a reshape may require allocating and moving data, these
cases are currently undefined behavior.
This is captured by the op documentation:
For now, it is assumed that all reassociation occur on contiguous dimensions or that the reshape op will be folded into its consumers. All other cases are undefined behavior and a reshape op may not lower to LLVM if it cannot be proven statically that it does not require alloc+copy.
Relevant invalid and roundtrip test are added.
clang-tidy: error: 'mlir/IR/OpDefinition.h' file not found [clang-diagnostic-error]