[all-commits] [llvm/llvm-project] e2069b: [OpenMP] Make isDone lightweight without calling s...

Ye Luo via All-commits all-commits at lists.llvm.org
Fri Feb 17 18:46:13 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e2069be83ea88837e1d3bb710aff17cd84ee7b7e
      https://github.com/llvm/llvm-project/commit/e2069be83ea88837e1d3bb710aff17cd84ee7b7e
  Author: Ye Luo <yeluo at anl.gov>
  Date:   2023-02-17 (Fri, 17 Feb 2023)

  Changed paths:
    M openmp/libomptarget/include/omptarget.h
    M openmp/libomptarget/src/interface.cpp
    M openmp/libomptarget/src/omptarget.cpp
    M openmp/libomptarget/src/private.h

  Log Message:
  -----------
  [OpenMP] Make isDone lightweight without calling synchronize

~TaskAsyncInfoWrapperTy() calls isDone. With synchronize inside isDone, we need to handle the error return from synchronize in the destructor.
The consumers of TaskAsyncInfoWrapperTy, targetDataMapper and targetKernel, both call AsyncInfo.synchronize() before exiting.
For this reason in ~TaskAsyncInfoWrapperTy(), calling synchronize() via isDone() is redundant.
This patch removes synchronize() call inside isDone() and makes it a lightweight check.
__tgt_target_nowait_query needs to call synchronize() before checking isDone().

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




More information about the All-commits mailing list