clang  10.0.0svn
Enumerations | Functions
Cuda.cpp File Reference
#include "Cuda.h"
#include "CommonArgs.h"
#include "InputInfo.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/Options.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/VirtualFileSystem.h"
#include <system_error>
Include dependency graph for Cuda.cpp:

Go to the source code of this file.

Enumerations

enum  DeviceDebugInfoLevel
 Debug info level for the NVPTX devices. More...
 

Functions

static CudaVersion ParseCudaVersionFile (llvm::StringRef V)
 
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)
 

Enumeration Type Documentation

◆ DeviceDebugInfoLevel

Debug info level for the NVPTX devices.

We may need to emit different debug info level for the host and for the device itselfi. This type controls emission of the debug info for the devices. It either prohibits disable info emission completely, or emits debug directives only, or emits same debug info as for the host.

Definition at line 287 of file Cuda.cpp.

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 303 of file Cuda.cpp.

References clang::codegenoptions::DebugDirectivesOnly.

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().

◆ ParseCudaVersionFile()

static CudaVersion ParseCudaVersionFile ( llvm::StringRef  V)
static

◆ shouldIncludePTX()

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

Definition at line 428 of file Cuda.cpp.

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