summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CIndexCodeCompletion.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2015-04-16 04:54:05 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2015-04-16 04:54:05 +0000
commit38e8953352c60f0052efa090ee2b18940e3f6ad3 (patch)
tree3aa241f18280651c24bbb65b1962c7980c88d3a4 /clang/tools/libclang/CIndexCodeCompletion.cpp
parent4421ac6bf8b9e69a65987a8f4e866464d52c69af (diff)
downloadbcm5719-llvm-38e8953352c60f0052efa090ee2b18940e3f6ad3.tar.gz
bcm5719-llvm-38e8953352c60f0052efa090ee2b18940e3f6ad3.zip
[OPENMP] Codegen for 'lastprivate' clause in 'for' directive.
#pragma omp for lastprivate(<var>) for (i = a; i < b; ++b) <BODY>; This construct is translated into something like: <last_iter> = alloca i32 <lastprivate_var> = alloca <type> <last_iter> = 0 ; No initializer for simple variables or a default constructor is called for objects. ; For arrays perform element by element initialization by the call of the default constructor. ... OMP_FOR_START(...,<last_iter>, ..); sets <last_iter> to 1 if this is the last iteration. <BODY> ... OMP_FOR_END if (<last_iter> != 0) { <var> = <lastprivate_var> ; Update original variable with the lastprivate value. } call __kmpc_cancel_barrier() ; an implicit barrier to avoid possible data race. Differential Revision: http://reviews.llvm.org/D8658 llvm-svn: 235074
Diffstat (limited to 'clang/tools/libclang/CIndexCodeCompletion.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud