This interface method is used to compute the buffer type of a value during bufferization. It was missing. This is interface method is used during loop bufferization.
Also fix a bug where a cast from an unranked tensor to a ranked tensor type did not always apply a fully dynamic layout map on the result memref.