Go to file
Alexey Bataev 38e8953352 [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
2015-04-16 04:54:05 +00:00
clang [OPENMP] Codegen for 'lastprivate' clause in 'for' directive. 2015-04-16 04:54:05 +00:00
clang-tools-extra Change range-based for-loop to be -Wrange-loop-analysis clean. 2015-04-15 01:21:57 +00:00
compiler-rt tsan: fix parsing of second_deadlock_stack flag 2015-04-14 10:32:33 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Implement atanh builtin 2015-04-07 16:20:22 +00:00
libcxx Qualify an internal call in is_assignable to prevent ADL lookup, which would 'complete' an type definition unnecessarily. Thanks to Richard Smith for the report. 2015-04-14 13:53:53 +00:00
libcxxabi Declare __cxa_new_handler as extern "C", or it declares a new variable 2015-04-15 15:35:56 +00:00
lld [Mips] Make tests more tolerant to offsets, symbol sizes etc 2015-04-15 18:32:22 +00:00
lldb Make -arch work on MacOSX. 2015-04-16 01:18:05 +00:00
llgo [llgo] add buildbot-slave config 2015-04-08 01:41:46 +00:00
llvm Replace loop doing postorder walk with postorder iterator 2015-04-16 04:28:32 +00:00
openmp The generation of the hierarchy used by hierarchical barrier improved in how the generation reacts to affinity set to none, or disabled, or no affinity available, or oversubscription. Some cleanup actions based on review comments to follow: need to use meaningful names instead of digital constants, e.g. use enumerators. 2015-04-13 18:51:59 +00:00
polly Allow loops in non-affine subregions -- SCoP Modeling 2015-04-12 22:58:40 +00:00