[all-commits] [llvm/llvm-project] 080295: [OPENMP]Fix overflow during counting the number of...

Alexey Bataev via All-commits all-commits at lists.llvm.org
Wed Jun 17 06:07:41 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 08029595ca36067e23d22c2a8732aba0d4afb50a
      https://github.com/llvm/llvm-project/commit/08029595ca36067e23d22c2a8732aba0d4afb50a
  Author: Alexey Bataev <a.bataev at hotmail.com>
  Date:   2020-06-17 (Wed, 17 Jun 2020)

  Changed paths:
    M clang/lib/Sema/SemaOpenMP.cpp
    M clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for-simd.c
    M clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for.c
    M clang/test/AST/ast-dump-openmp-teams-distribute-simd.c
    M clang/test/AST/ast-dump-openmp-teams-distribute.c
    M clang/test/OpenMP/for_codegen.cpp
    M clang/test/OpenMP/master_taskloop_reduction_codegen.cpp
    M clang/test/OpenMP/master_taskloop_simd_reduction_codegen.cpp
    M clang/test/OpenMP/ordered_doacross_codegen.cpp
    M clang/test/OpenMP/parallel_master_taskloop_reduction_codegen.cpp
    M clang/test/OpenMP/parallel_master_taskloop_simd_reduction_codegen.cpp
    M clang/test/OpenMP/taskloop_reduction_codegen.cpp
    M clang/test/OpenMP/taskloop_simd_reduction_codegen.cpp
    M openmp/runtime/test/worksharing/for/omp_for_bigbounds.c

  Log Message:
  -----------
  [OPENMP]Fix overflow during counting the number of iterations.

Summary:
The OpenMP loops are normalized and transformed into the loops from 0 to
max number of iterations. In some cases, original scheme may lead to
overflow during calculation of number of iterations. If it is unknown,
if we can end up with overflow or not (the bounds are not constant and
  we cannot define if there is an overflow), cast original type to the
  unsigned.

Reviewers: jdoerfert

Subscribers: yaxunl, guansong, sstefan1, openmp-commits, cfe-commits, caomhin

Tags: #clang, #openmp

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




More information about the All-commits mailing list