[polly] de0457a - [Polly] Clean up hasFeasibleRuntimeContext.
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 23 11:04:52 PST 2021
Author: Michael Kruse
Date: 2021-01-23T13:03:48-06:00
New Revision: de0457a013a93d6470094194ece1a1bc4eec1bad
URL: https://github.com/llvm/llvm-project/commit/de0457a013a93d6470094194ece1a1bc4eec1bad
DIFF: https://github.com/llvm/llvm-project/commit/de0457a013a93d6470094194ece1a1bc4eec1bad.diff
LOG: [Polly] Clean up hasFeasibleRuntimeContext.
Added:
Modified:
polly/include/polly/ScopInfo.h
polly/lib/Analysis/ScopInfo.cpp
Removed:
################################################################################
diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h
index cdc70e00fa88..b4b02552f511 100644
--- a/polly/include/polly/ScopInfo.h
+++ b/polly/include/polly/ScopInfo.h
@@ -1904,9 +1904,6 @@ class Scop {
void init(AAResults &AA, AssumptionCache &AC, DominatorTree &DT,
LoopInfo &LI);
- /// Add parameter constraints to @p C that imply a non-empty domain.
- isl::set addNonEmptyDomainConstraints(isl::set C) const;
-
/// Return the access for the base ptr of @p MA if any.
MemoryAccess *lookupBasePtrAccess(MemoryAccess *MA);
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 9d2dca4ba575..0ae91d81f42d 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -1977,28 +1977,15 @@ bool Scop::isProfitable(bool ScalarsAreUnprofitable) const {
}
bool Scop::hasFeasibleRuntimeContext() const {
- auto PositiveContext = getAssumedContext();
- auto NegativeContext = getInvalidContext();
- PositiveContext = addNonEmptyDomainConstraints(PositiveContext);
- // addNonEmptyDomainConstraints returns null if ScopStmts have a null domain
- if (!PositiveContext)
+ if (Stmts.empty())
return false;
- bool IsFeasible = !(PositiveContext.is_empty() ||
- PositiveContext.is_subset(NegativeContext));
- if (!IsFeasible)
- return false;
-
- auto DomainContext = getDomains().params();
- IsFeasible = !DomainContext.is_subset(NegativeContext);
- IsFeasible &= !getContext().is_subset(NegativeContext);
-
- return IsFeasible;
-}
-
-isl::set Scop::addNonEmptyDomainConstraints(isl::set C) const {
- isl::set DomainContext = getDomains().params();
- return C.intersect_params(DomainContext);
+ isl::set PositiveContext = getAssumedContext();
+ isl::set NegativeContext = getInvalidContext();
+ PositiveContext = PositiveContext.intersect_params(Context);
+ PositiveContext = PositiveContext.intersect_params(getDomains().params());
+ return PositiveContext.is_empty().is_false() &&
+ PositiveContext.is_subset(NegativeContext).is_false();
}
MemoryAccess *Scop::lookupBasePtrAccess(MemoryAccess *MA) {
More information about the llvm-commits
mailing list