]> granicus.if.org Git - clang/commit
[CUDA][OPENMP][NVPTX]Improve logic of the debug info support.
authorAlexey Bataev <a.bataev@hotmail.com>
Wed, 12 Dec 2018 14:52:27 +0000 (14:52 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Wed, 12 Dec 2018 14:52:27 +0000 (14:52 +0000)
commit55b58df36e758826d6b27598ca37c211b8fecf8a
treef6d13b11cb61dd9088f7deae8679dc9b4d5ab968
parentd31b70f32c8649a0b914010b523a0430fe0cce0a
[CUDA][OPENMP][NVPTX]Improve logic of the debug info support.

Summary:
Added support for the -gline-directives-only option + fixed logic of the
debug info for CUDA devices. If optimization level is O0, then options
--[no-]cuda-noopt-device-debug do not affect the debug info level. If
the optimization level is >O0, debug info options are used +
--no-cuda-noopt-device-debug is used or no --cuda-noopt-device-debug is
used, the optimization level for the device code is kept and the
emission of the debug directives is used.
If the opt level is > O0, debug info is requested +
--cuda-noopt-device-debug option is used, the optimization is disabled
for the device code + required debug info is emitted.

Reviewers: tra, echristo

Subscribers: aprantl, guansong, JDevlieghere, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348930 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/ToolChain.h
lib/Driver/ToolChains/Clang.cpp
lib/Driver/ToolChains/Cuda.cpp
lib/Driver/ToolChains/Cuda.h
test/Driver/cuda-dwarf-2.cu
test/Driver/openmp-offload-gpu.c