[Openmp-commits] [PATCH] D81881: [OPENMP]Fix overflow during counting the number of iterations.

Alexey Bataev via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jun 15 14:21:10 PDT 2020


ABataev created this revision.
ABataev added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, sstefan1, guansong, yaxunl.
Herald added projects: clang, OpenMP.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81881

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81881.270859.patch
Type: text/x-patch
Size: 160890 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200615/5d9cafcd/attachment-0001.bin>


More information about the Openmp-commits mailing list