[PATCH] D51554: [CUDA][OPENMP][NVPTX]Improve logic of the debug info support.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 9 08:58:07 PST 2018


ABataev added inline comments.


================
Comment at: lib/Driver/ToolChains/Cuda.cpp:292
+  bool IsDebugEnabled = !A || A->getOption().matches(options::OPT_O0) ||
+                        Args.hasFlag(options::OPT_cuda_noopt_device_debug,
+                                     options::OPT_no_cuda_noopt_device_debug,
----------------
echristo wrote:
> Is this an nvcc compatibility flag?
No, nvcc uses different set of flags. It uses `-g` for the debug info for the host code and `-G` for the device code. I'm not the original author of this option. clang uses it to control emission of the debug info for the device.
The bad thing about nvcc that it disables optimizations when `-G` is used. Using this option we can use LLVM optimizations and disable the optimizations only when we call `ptxas` tool.


Repository:
  rC Clang

https://reviews.llvm.org/D51554





More information about the cfe-commits mailing list