From 8bc98c731f0aebcd14b5e78deeb9a8cbfa4b93e6 Mon Sep 17 00:00:00 2001 From: Gheorghe-Teodor Bercea Date: Wed, 9 Jan 2019 20:38:35 +0000 Subject: [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 --- docs/OpenMPSupport.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs') 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 --------------------------------------------------------------- -- cgit v1.2.1