summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
diff options
context:
space:
mode:
authorShilei Tian <tianshilei1992@gmail.com>2020-07-22 22:48:53 -0400
committerShilei Tian <tianshilei1992@gmail.com>2020-07-22 22:55:34 -0400
commit9b2832c0897c1d39846eee0ad84bf787f05d2d4b (patch)
treeec844334e5a98f24fc678baa4104733a1beb13b9 /llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
parentc4cf250c5bab4eaa5cb9e8e1836bfb709a98e7e7 (diff)
[OpenMP] Wait for kernel prior to memory deallocation
Summary: In the function `target`, memory deallocation and `target_data_end` is called immediately returning from launching kernel. This might cause a race condition that the corresponding memory is still being used by the kernel and a potential issue that when the kernel starts to execute, its required data have already been deallocated, especially when multiple kernels running concurrently. Since nevertheless, we will block the thread issuing the target offloading at the end of the target, we just move the synchronization ahead a little bit to make sure the correctness. Reviewers: jdoerfert Reviewed By: jdoerfert Subscribers: yaxunl, guansong, sstefan1, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D84381
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp')
0 files changed, 0 insertions, 0 deletions