9#ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_AMDGPU_H
10#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_AMDGPU_H
17#include "llvm/ADT/SmallString.h"
18#include "llvm/TargetParser/TargetParser.h"
28class LLVM_LIBRARY_VISIBILITY
Linker final :
public Tool {
35 const llvm::opt::ArgList &TCArgs,
36 const char *LinkingOutput)
const override;
40 const llvm::opt::ArgList &Args,
41 std::vector<StringRef> &Features);
44 llvm::opt::ArgStringList &CmdArgs);
63 const llvm::opt::ArgList &Args);
75 llvm::opt::DerivedArgList *
76 TranslateArgs(
const llvm::opt::DerivedArgList &Args, StringRef BoundArch,
79 void addClangTargetOptions(
const llvm::opt::ArgList &DriverArgs,
80 llvm::opt::ArgStringList &CC1Args,
85 static bool getDefaultDenormsAreZeroForTarget(llvm::AMDGPU::GPUKind GPUKind);
87 llvm::DenormalMode getDefaultDenormalModeForType(
88 const llvm::opt::ArgList &DriverArgs,
const JobAction &JA,
89 const llvm::fltSemantics *FPType =
nullptr)
const override;
91 static bool isWave64(
const llvm::opt::ArgList &DriverArgs,
92 llvm::AMDGPU::GPUKind Kind);
102 bool shouldSkipSanitizeOption(
const ToolChain &TC,
103 const llvm::opt::ArgList &DriverArgs,
105 const llvm::opt::Arg *A)
const;
110 getSystemGPUArchs(
const llvm::opt::ArgList &Args)
const override;
114 virtual void checkTargetID(
const llvm::opt::ArgList &DriverArgs)
const;
129 StringRef
getGPUArch(
const llvm::opt::ArgList &DriverArgs)
const;
139 const llvm::opt::ArgList &Args);
142 llvm::opt::ArgStringList &CC1Args,
148 const std::string &GPUArch,
152 return SanitizerKind::Address;
156 if (!Args.hasFlag(options::OPT_fgpu_sanitize, options::OPT_fno_gpu_sanitize,
160 for (
auto *A : Args.filtered(options::OPT_fsanitize_EQ)) {
163 if (K != SanitizerKind::Address)
164 Diags.Report(clang::diag::warn_drv_unsupported_option_for_target)
165 << A->getAsString(Args) <<
getTriple().str();
Compilation - A set of tasks to perform for a single driver invocation.
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
SmallVector< InputInfo, 4 > InputInfoList
The JSON file list parser is used to communicate input to InstallAPI.
SanitizerMask parseSanitizerValue(StringRef Value, bool AllowGroups)
Parse a single value from a -fsanitize= or -fno-sanitize= value list.