summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polly/include/polly/ScopInfo.h5
-rw-r--r--polly/lib/Analysis/ScopInfo.cpp7
2 files changed, 8 insertions, 4 deletions
diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h
index 7bdf6d363e0..f6798357680 100644
--- a/polly/include/polly/ScopInfo.h
+++ b/polly/include/polly/ScopInfo.h
@@ -2123,6 +2123,11 @@ private:
/// have been hoisted as loop invariant.
void canonicalizeDynamicBasePtrs();
+ /// Check if @p MA can always be hoisted without execution context.
+ bool canAlwaysBeHoisted(MemoryAccess *MA, bool StmtInvalidCtxIsEmpty,
+ bool MAInvalidCtxIsEmpty,
+ bool NonHoistableCtxIsEmpty);
+
/// Add invariant loads listed in @p InvMAs with the domain of @p Stmt.
void addInvariantLoads(ScopStmt &Stmt, InvariantAccessesTy &InvMAs);
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 12248e1269f..17c4453db80 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -3836,10 +3836,9 @@ InvariantEquivClassTy *Scop::lookupInvariantEquivClass(Value *Val) {
return nullptr;
}
-/// Check if @p MA can always be hoisted without execution context.
-static bool canAlwaysBeHoisted(MemoryAccess *MA, bool StmtInvalidCtxIsEmpty,
- bool MAInvalidCtxIsEmpty,
- bool NonHoistableCtxIsEmpty) {
+bool Scop::canAlwaysBeHoisted(MemoryAccess *MA, bool StmtInvalidCtxIsEmpty,
+ bool MAInvalidCtxIsEmpty,
+ bool NonHoistableCtxIsEmpty) {
LoadInst *LInst = cast<LoadInst>(MA->getAccessInstruction());
const DataLayout &DL = LInst->getParent()->getModule()->getDataLayout();
// TODO: We can provide more information for better but more expensive
OpenPOWER on IntegriCloud