[all-commits] [llvm/llvm-project] 1b93eb: [OPENMP]Do not capture base pointer by reference i...

Alexey Bataev via All-commits all-commits at lists.llvm.org
Tue Aug 18 06:08:25 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1b93ebccaa094c079db7ad729e2f7fea7bac2f34
      https://github.com/llvm/llvm-project/commit/1b93ebccaa094c079db7ad729e2f7fea7bac2f34
  Author: Alexey Bataev <a.bataev at hotmail.com>
  Date:   2020-08-18 (Tue, 18 Aug 2020)

  Changed paths:
    M clang/lib/Sema/SemaOpenMP.cpp
    M clang/test/OpenMP/distribute_parallel_for_reduction_task_codegen.cpp
    M clang/test/OpenMP/for_reduction_task_codegen.cpp
    M clang/test/OpenMP/parallel_for_reduction_task_codegen.cpp
    M clang/test/OpenMP/parallel_master_reduction_task_codegen.cpp
    M clang/test/OpenMP/parallel_reduction_task_codegen.cpp
    M clang/test/OpenMP/parallel_sections_reduction_task_codegen.cpp
    M clang/test/OpenMP/sections_reduction_task_codegen.cpp
    M clang/test/OpenMP/target_parallel_for_reduction_task_codegen.cpp
    M clang/test/OpenMP/target_parallel_reduction_task_codegen.cpp
    M clang/test/OpenMP/target_teams_distribute_parallel_for_reduction_task_codegen.cpp
    M clang/test/OpenMP/teams_distribute_parallel_for_reduction_task_codegen.cpp

  Log Message:
  -----------
  [OPENMP]Do not capture base pointer by reference if it is used as a base for array-like reduction.

If the declaration is used in the reduction clause, it is captured by
reference by default. But if the declaration is a pointer and it is a
base for array-like reduction, this declaration can be captured by
value, since the pointee is reduced but not the original declaration.

Differential Revision: https://reviews.llvm.org/D85321




More information about the All-commits mailing list