diff options
author | Pekka Jaaskelainen <pekka.jaaskelainen@tut.fi> | 2013-02-13 18:08:57 +0000 |
---|---|---|
committer | Pekka Jaaskelainen <pekka.jaaskelainen@tut.fi> | 2013-02-13 18:08:57 +0000 |
commit | 5d0ce79e26f40141f35cc0002dc5cc6060382359 (patch) | |
tree | e62a745a5f90a404df64e46d0ba6b9ee3f9edf58 /include | |
parent | 96848dfc465c8c7f156a562c246803ebefcf21cf (diff) | |
download | external_llvm-5d0ce79e26f40141f35cc0002dc5cc6060382359.zip external_llvm-5d0ce79e26f40141f35cc0002dc5cc6060382359.tar.gz external_llvm-5d0ce79e26f40141f35cc0002dc5cc6060382359.tar.bz2 |
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')
-rw-r--r-- | include/llvm/Analysis/LoopInfo.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index 9caa69a..a20e065 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; |