diff options
| author | Adam Nemet <anemet@apple.com> | 2015-04-07 03:35:26 +0000 |
|---|---|---|
| committer | Adam Nemet <anemet@apple.com> | 2015-04-07 03:35:26 +0000 |
| commit | 51870d16e4663a79cf8ebf6b2d860c2695b3d091 (patch) | |
| tree | fba2dac3b7de8161ccda1167f334fab3e6852fc7 /llvm/lib | |
| parent | a1384912b212bc743f95a7240ebe9bdce339c952 (diff) | |
| download | bcm5719-llvm-51870d16e4663a79cf8ebf6b2d860c2695b3d091.tar.gz bcm5719-llvm-51870d16e4663a79cf8ebf6b2d860c2695b3d091.zip | |
[LoopAccesses] New API to query if memchecks are necessary after partitioning
This is used by Loop Distribution.
llvm-svn: 234283
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Analysis/LoopAccessAnalysis.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp index 159efff1a70..ae561d7a26a 100644 --- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp +++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp @@ -177,6 +177,17 @@ void LoopAccessInfo::RuntimePointerCheck::print( } } +bool LoopAccessInfo::RuntimePointerCheck::needsAnyChecking( + const SmallVectorImpl<int> *PtrPartition) const { + unsigned NumPointers = Pointers.size(); + + for (unsigned I = 0; I < NumPointers; ++I) + for (unsigned J = I + 1; J < NumPointers; ++J) + if (needsChecking(I, J, PtrPartition)) + return true; + return false; +} + namespace { /// \brief Analyses memory accesses in a loop. /// |

