clang  14.0.0git
Macros | Functions
Cuda.cpp File Reference
#include "Cuda.h"
#include "CommonArgs.h"
#include "clang/Basic/Cuda.h"
#include "clang/Config/config.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Distro.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/DriverDiagnostic.h"
#include "clang/Driver/InputInfo.h"
#include "clang/Driver/Options.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/TargetParser.h"
#include "llvm/Support/VirtualFileSystem.h"
#include <system_error>
Include dependency graph for Cuda.cpp:

Go to the source code of this file.

Macros

#define CASE_CUDA_VERSION(CUDA_VER, PTX_VER)
 

Functions

static DeviceDebugInfoLevel mustEmitDebugInfo (const ArgList &Args)
 Define debug info level for the NVPTX devices. More...
 
static bool shouldIncludePTX (const ArgList &Args, const char *gpu_arch)
 

Macro Definition Documentation

◆ CASE_CUDA_VERSION

#define CASE_CUDA_VERSION (   CUDA_VER,
  PTX_VER 
)
Value:
case CudaVersion::CUDA_##CUDA_VER: \
PtxFeature = "+ptx" #PTX_VER; \
break;

Function Documentation

◆ mustEmitDebugInfo()

static DeviceDebugInfoLevel mustEmitDebugInfo ( const ArgList &  Args)
static

Define debug info level for the NVPTX devices.

If the debug info for both the host and device are disabled (-g0/-ggdb0 or no debug options at all). If only debug directives are requested for the both host and device (-gline-directvies-only), or the debug info only for the device is disabled (optimization is on and –cuda-noopt-device-debug was not specified), the debug directves only must be emitted for the device. Otherwise, use the same debug info level just like for the host (with the limitations of only supported DWARF2 standard).

Definition at line 351 of file Cuda.cpp.

References clang::codegenoptions::DebugDirectivesOnly, and clang::driver::willEmitRemarks().

Referenced by clang::driver::toolchains::CudaToolChain::adjustDebugInfoKind(), clang::driver::tools::NVPTX::Assembler::ConstructJob(), clang::driver::tools::NVPTX::Linker::ConstructJob(), and clang::driver::tools::NVPTX::OpenMPLinker::ConstructJob().

◆ shouldIncludePTX()

static bool shouldIncludePTX ( const ArgList &  Args,
const char *  gpu_arch 
)
static

Definition at line 480 of file Cuda.cpp.

Referenced by clang::driver::tools::NVPTX::Linker::ConstructJob().