[polly] r310236 - [ScopInfo] Make Scop::canAlwaysBeHoisted a member function
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 6 17:10:11 PDT 2017
Author: grosser
Date: Sun Aug 6 17:10:11 2017
New Revision: 310236
URL: http://llvm.org/viewvc/llvm-project?rev=310236&view=rev
Log:
[ScopInfo] Make Scop::canAlwaysBeHoisted a member function
Modified:
polly/trunk/include/polly/ScopInfo.h
polly/trunk/lib/Analysis/ScopInfo.cpp
Modified: polly/trunk/include/polly/ScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=310236&r1=310235&r2=310236&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Sun Aug 6 17:10:11 2017
@@ -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);
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=310236&r1=310235&r2=310236&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Sun Aug 6 17:10:11 2017
@@ -3836,10 +3836,9 @@ InvariantEquivClassTy *Scop::lookupInvar
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
More information about the llvm-commits
mailing list