diff options
author | Benoit Jacob <benoitjacob@google.com> | 2022-01-13 17:39:06 +0000 |
---|---|---|
committer | Lei Zhang <antiagainst@google.com> | 2022-01-13 17:46:20 +0000 |
commit | 499703e9c08a055a9007278e5222b0550aba89bf (patch) | |
tree | d3643caf660da2d14eb9ad7035a4eb6d2545e35f /lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h | |
parent | fced2744d38bbbcdbc4b780f020b3bfef0abd11f (diff) | |
download | llvm-499703e9c08a055a9007278e5222b0550aba89bf.zip llvm-499703e9c08a055a9007278e5222b0550aba89bf.tar.gz llvm-499703e9c08a055a9007278e5222b0550aba89bf.tar.bz2 |
Enable ReassociatingReshapeOpConversion with "non-identity" layouts.
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
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h')
0 files changed, 0 insertions, 0 deletions