[Openmp-commits] [PATCH] D72525: [LIBOMPTARGET] Do not increment/decrement the refcount for "declare target" objects

George Rokos via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jan 13 08:03:37 PST 2020


grokos added a comment.

That's a good observation, although I can't think of a normal-use scenario where the refcount could overflow. Of course it can overflow in pathological cases like:

  for (huge_number_of_iterations) {
  #pragma omp target enter data map (var)
  }

but in such problematic code even a 64-bit counter could overflow. Actually the above example is taylor-made to intentionally make the refcount overflow.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72525/new/

https://reviews.llvm.org/D72525





More information about the Openmp-commits mailing list