summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/LoopInfo.h
diff options
context:
space:
mode:
authorPekka Jaaskelainen <pekka.jaaskelainen@tut.fi>2013-02-13 18:08:57 +0000
committerPekka Jaaskelainen <pekka.jaaskelainen@tut.fi>2013-02-13 18:08:57 +0000
commit5d0ce79e26f40141f35cc0002dc5cc6060382359 (patch)
treee62a745a5f90a404df64e46d0ba6b9ee3f9edf58 /include/llvm/Analysis/LoopInfo.h
parent96848dfc465c8c7f156a562c246803ebefcf21cf (diff)
downloadllvm-5d0ce79e26f40141f35cc0002dc5cc6060382359.tar.gz
llvm-5d0ce79e26f40141f35cc0002dc5cc6060382359.tar.bz2
llvm-5d0ce79e26f40141f35cc0002dc5cc6060382359.tar.xz
Metadata for annotating loops as parallel. The first consumer for this
metadata is the loop vectorizer. See the documentation update for more info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/LoopInfo.h')
-rw-r--r--include/llvm/Analysis/LoopInfo.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h
index 9caa69a1d4..a20e065785 100644
--- a/include/llvm/Analysis/LoopInfo.h
+++ b/include/llvm/Analysis/LoopInfo.h
@@ -377,6 +377,20 @@ public:
/// isSafeToClone - Return true if the loop body is safe to clone in practice.
bool isSafeToClone() const;
+ /// Returns true if the loop is annotated parallel.
+ ///
+ /// A parallel loop can be assumed to not contain any dependencies between
+ /// iterations by the compiler. That is, any loop-carried dependency checking
+ /// can be skipped completely when parallelizing the loop on the target
+ /// machine. Thus, if the parallel loop information originates from the
+ /// programmer, e.g. via the OpenMP parallel for pragma, it is the
+ /// programmer's responsibility to ensure there are no loop-carried
+ /// dependencies. The final execution order of the instructions across
+ /// iterations is not guaranteed, thus, the end result might or might not
+ /// implement actual concurrent execution of instructions across multiple
+ /// iterations.
+ bool isAnnotatedParallel() const;
+
/// hasDedicatedExits - Return true if no exit block for the loop
/// has a predecessor that is outside the loop.
bool hasDedicatedExits() const;