aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Tooling/JSONCompilationDatabase.cpp
diff options
context:
space:
mode:
authorShilei Tian <tianshilei1992@gmail.com>2020-10-27 00:02:23 -0400
committerShilei Tian <tianshilei1992@gmail.com>2020-10-27 00:02:32 -0400
commitd38788b357ad29083eb3b03027db908559aae2a6 (patch)
tree6dae1805a899af590b44ba860eb1512f50c6fa26 /clang/lib/Tooling/JSONCompilationDatabase.cpp
parentc4ef3115b4296321090ce33987d6fdf7fa337fc1 (diff)
downloadllvm-d38788b357ad29083eb3b03027db908559aae2a6.zip
llvm-d38788b357ad29083eb3b03027db908559aae2a6.tar.gz
llvm-d38788b357ad29083eb3b03027db908559aae2a6.tar.bz2
[Clang][OpenMP] Avoid unnecessary privatization of mapper array when there is no user defined mapper
In current implementation, if it requires an outer task, the mapper array will be privatized no matter whether it has mapper. In fact, when there is no mapper, the mapper array only contains number of nullptr. In the libomptarget, the use of mapper array is `if (mappers_array && mappers_array[i])`, which means we can directly set mapper array to nullptr if there is no mapper. This can avoid unnecessary data copy. In this patch, the data privatization will not be emitted if the mapper array is nullptr. When it comes to the emit of task body, the nullptr will be used directly. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D90101
Diffstat (limited to 'clang/lib/Tooling/JSONCompilationDatabase.cpp')
0 files changed, 0 insertions, 0 deletions