diff options
| author | Tobias Grosser <tobias@grosser.es> | 2017-08-07 00:10:11 +0000 |
|---|---|---|
| committer | Tobias Grosser <tobias@grosser.es> | 2017-08-07 00:10:11 +0000 |
| commit | 305d3164f289625ad0d6c06af03abb57c0a99393 (patch) | |
| tree | 6987421b0f6f8e88b8c130148d934287ba434542 | |
| parent | e69b272260807f8d6ceac3a8719db8131fb0370a (diff) | |
| download | bcm5719-llvm-305d3164f289625ad0d6c06af03abb57c0a99393.tar.gz bcm5719-llvm-305d3164f289625ad0d6c06af03abb57c0a99393.zip | |
[ScopInfo] Make Scop::canAlwaysBeHoisted a member function
llvm-svn: 310236
| -rw-r--r-- | polly/include/polly/ScopInfo.h | 5 | ||||
| -rw-r--r-- | polly/lib/Analysis/ScopInfo.cpp | 7 |
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 |

