summaryrefslogtreecommitdiffstats
path: root/polly/lib
diff options
context:
space:
mode:
authorMichael Kruse <llvm@meinersbur.de>2019-09-17 22:59:43 +0000
committerMichael Kruse <llvm@meinersbur.de>2019-09-17 22:59:43 +0000
commit241b02e762872173dcb5bd27ff9fe3eb7dce1db2 (patch)
tree99d60419c07f854e1c511a2d98883d677e32a83c /polly/lib
parent33054a02f762671d85253fc49fa819ccbc8b0474 (diff)
downloadbcm5719-llvm-241b02e762872173dcb5bd27ff9fe3eb7dce1db2.tar.gz
bcm5719-llvm-241b02e762872173dcb5bd27ff9fe3eb7dce1db2.zip
[CodeGen] Handle outlining of CopyStmts.
Since the removal of extensions nodes from schedule trees in r362257 it is possible to emit parallel code for SCoPs containing matrix-multiplications. However, the code looking for references used in outlined statement was not prepared to handle CopyStmts introduced by the matrix-matrix multiplication detection. In this case, CopyStmts do not introduce references in addition to the ones captured by MemoryAccesses, i.e. we change the assertion to accept CopyStmts and add a regression test for this case. This fixes llvm.org/PR43164 llvm-svn: 372188
Diffstat (limited to 'polly/lib')
-rw-r--r--polly/lib/CodeGen/IslNodeBuilder.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/polly/lib/CodeGen/IslNodeBuilder.cpp b/polly/lib/CodeGen/IslNodeBuilder.cpp
index 492944cf7c3..13d61694c54 100644
--- a/polly/lib/CodeGen/IslNodeBuilder.cpp
+++ b/polly/lib/CodeGen/IslNodeBuilder.cpp
@@ -231,11 +231,12 @@ void addReferencesFromStmt(const ScopStmt *Stmt, void *UserPtr,
if (Stmt->isBlockStmt())
findReferencesInBlock(References, Stmt, Stmt->getBasicBlock());
- else {
- assert(Stmt->isRegionStmt() &&
- "Stmt was neither block nor region statement");
+ else if (Stmt->isRegionStmt()) {
for (BasicBlock *BB : Stmt->getRegion()->blocks())
findReferencesInBlock(References, Stmt, BB);
+ } else {
+ assert(Stmt->isCopyStmt());
+ // Copy Stmts have no instructions that we need to consider.
}
for (auto &Access : *Stmt) {
OpenPOWER on IntegriCloud