Enable ReassociatingReshapeOpConversion with "non-identity" layouts.
This removes an early-return in this function, which seems unnecessary and is
preventing some memref.collapse_shape from converting to LLVM (see included lit test).
It seems unnecessary because the return message says "only empty layout map is supported"
but there actually is code in this function to deal with non-empty layout maps. Maybe
it refers to an earlier state of implementation and is just out of date?
Though, there is another concern about this early return: the condition that it actually
checks, {src,dst}MemrefType.getLayout().isIdentity(), is not quite the same as what the
return message says, "only empty layout map is supported". Stepping through this
getLayout().isIdentity() code in GDB, I found that it evaluates to .getAffineMap().isIdentity()
which does (AffineMap.cpp:271):
if (getNumDims() != getNumResults()) return false;
This seems that it would always return false for memrefs of rank greater than 1 ?
See my longer comment but please only relax this in the fully static case.