forked from OSchip/llvm-project
499703e9c0
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 ? Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D114808 |
||
---|---|---|
.. | ||
cmake/modules | ||
docs | ||
examples | ||
include | ||
lib | ||
python | ||
test | ||
tools | ||
unittests | ||
utils | ||
.clang-format | ||
.clang-tidy | ||
CMakeLists.txt | ||
LICENSE.TXT | ||
README.md |
README.md
Multi-Level Intermediate Representation
See https://mlir.llvm.org/ for more information.