[CUDA][OpenMP] Add a generic offload action builder
Summary: This patch proposes a new class to generate and record action dependences related with offloading. The builder provides three main functionalities: - Add device dependences to host actions. - Add host dependence to device actions. - Register device top-level actions. The constructor of the builder detect the programming models that should be supported, and generates a specialized builder for each. If a new programming model is to be added in the future, only a new specialized builder has to be implemented. When the specialized builder is generated, it produces programming-model-specific diagnostics. A CUDA specialized builder is proposed in the patch that mostly consists of the partition of the current `buildCudaAction` by the three different functionalities. Reviewers: tra, echristo, ABataev, jlebar, hfinkel Subscribers: Hahnfeld, whchung, guansong, jlebar, mehdi_amini, andreybokhanko, tcramer, mkuron, cfe-commits, arpith-jacob, carlo.bertolli, caomhin Differential Revision: https://reviews.llvm.org/D18172 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282865 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Driver/Compilation.h 6 additions, 0 deletionsinclude/clang/Driver/Compilation.h
- lib/Driver/Driver.cpp 557 additions, 161 deletionslib/Driver/Driver.cpp
- lib/Driver/Types.cpp 1 addition, 1 deletionlib/Driver/Types.cpp
- test/Driver/cuda-bindings.cu 5 additions, 5 deletionstest/Driver/cuda-bindings.cu
- test/Driver/cuda-phases.cu 113 additions, 118 deletionstest/Driver/cuda-phases.cu
Loading
Please register or sign in to comment