summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2019-01-09 20:38:35 +0000
committerGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2019-01-09 20:38:35 +0000
commit8bc98c731f0aebcd14b5e78deeb9a8cbfa4b93e6 (patch)
treeb308663bd72b833d25fa615e14aef1ff214a2e6b /docs
parent0aa94314808bdeedcdecfc97444b0f96ef59b72c (diff)
downloadclang-8bc98c731f0aebcd14b5e78deeb9a8cbfa4b93e6.tar.gz
[OpenMP] Add flag for preventing the extension to 64 bits for the collapse loop counter
Summary: Introduce a compiler flag for cases when the user knows that the collapsed loop counter can be safely represented using at most 32 bits. This will prevent the emission of expensive mathematical operations (such as the div operation) on the iteration variable using 64 bits where 32 bit operations are sufficient. Reviewers: ABataev, caomhin Reviewed By: ABataev Subscribers: hfinkel, kkwli0, guansong, cfe-commits Differential Revision: https://reviews.llvm.org/D55928 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350758 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/OpenMPSupport.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/OpenMPSupport.rst b/docs/OpenMPSupport.rst
index 5ca3613cde..04a9648ca2 100644
--- a/docs/OpenMPSupport.rst
+++ b/docs/OpenMPSupport.rst
@@ -108,6 +108,16 @@ are stored in the global memory. In `Cuda` mode local variables are not shared
between the threads and it is user responsibility to share the required data
between the threads in the parallel regions.
+Collapsed loop nest counter
+---------------------------
+
+When using the collapse clause on a loop nest the default behaviour is to
+automatically extend the representation of the loop counter to 64 bits for
+the cases where the sizes of the collapsed loops are not known at compile
+time. To prevent this conservative choice and use at most 32 bits,
+compile your program with the `-fopenmp-optimistic-collapse`.
+
+
Features not supported or with limited support for Cuda devices
---------------------------------------------------------------