diff options
author | Michael Kruse <llvm@meinersbur.de> | 2018-08-01 22:28:32 +0000 |
---|---|---|
committer | Michael Kruse <llvm@meinersbur.de> | 2018-08-01 22:28:32 +0000 |
commit | 842bdd0071df8bd810fc963e8a1924af7fe14f55 (patch) | |
tree | fc420fc0f0b90c9831dc4e2dd71643116917c306 /polly/lib/Analysis/ScopInfo.cpp | |
parent | ce3efe57ef4264a20da5abfe526e1ed52fc66905 (diff) | |
download | bcm5719-llvm-842bdd0071df8bd810fc963e8a1924af7fe14f55.tar.gz bcm5719-llvm-842bdd0071df8bd810fc963e8a1924af7fe14f55.zip |
[ScopBuilder] Set domain to empty instead of NULL.
The domain generation used nullptr to mark the domain of an error block
as never-executed. Later, nullptr domains are recreated with a
zero-tuple domain that then mismatches with the expected domain the
error block within the loop.
Instead of using nullptr, assign an empty domain which preserves the
expected space. Remove empty domains during SCoP simplification.
Fixes llvm.org/PR38218.
llvm-svn: 338646
Diffstat (limited to 'polly/lib/Analysis/ScopInfo.cpp')
-rw-r--r-- | polly/lib/Analysis/ScopInfo.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index 489a60b6754..9e8ee9116a9 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -2615,7 +2615,7 @@ bool Scop::propagateInvalidStmtDomains( isl::set DomPar = Domain.params(); recordAssumption(ERRORBLOCK, DomPar, BB->getTerminator()->getDebugLoc(), AS_RESTRICTION); - Domain = nullptr; + Domain = isl::set::empty(Domain.get_space()); } if (InvalidDomain.is_empty()) { @@ -3523,7 +3523,10 @@ void Scop::removeStmts(std::function<bool(ScopStmt &)> ShouldDelete, void Scop::removeStmtNotInDomainMap() { auto ShouldDelete = [this](ScopStmt &Stmt) -> bool { - return !this->DomainMap.lookup(Stmt.getEntryBlock()); + isl::set Domain = DomainMap.lookup(Stmt.getEntryBlock()); + if (!Domain) + return true; + return Domain.is_empty(); }; removeStmts(ShouldDelete, false); } |