#include "ABIInfoImpl.h"
#include "TargetInfo.h"
#include "clang/Basic/TargetOptions.h"
usingnamespaceclang;
usingnamespaceclang::CodeGen;
namespace {
class AMDGPUABIInfo final : public DefaultABIInfo { … };
bool AMDGPUABIInfo::isHomogeneousAggregateBaseType(QualType Ty) const { … }
bool AMDGPUABIInfo::isHomogeneousAggregateSmallEnough(
const Type *Base, uint64_t Members) const { … }
unsigned AMDGPUABIInfo::numRegsForType(QualType Ty) const { … }
void AMDGPUABIInfo::computeInfo(CGFunctionInfo &FI) const { … }
RValue AMDGPUABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
QualType Ty, AggValueSlot Slot) const { … }
ABIArgInfo AMDGPUABIInfo::classifyReturnType(QualType RetTy) const { … }
ABIArgInfo AMDGPUABIInfo::classifyKernelArgumentType(QualType Ty) const { … }
ABIArgInfo AMDGPUABIInfo::classifyArgumentType(QualType Ty, bool Variadic,
unsigned &NumRegsLeft) const { … }
class AMDGPUTargetCodeGenInfo : public TargetCodeGenInfo { … };
}
static bool requiresAMDGPUProtectedVisibility(const Decl *D,
llvm::GlobalValue *GV) { … }
void AMDGPUTargetCodeGenInfo::setFunctionDeclAttributes(
const FunctionDecl *FD, llvm::Function *F, CodeGenModule &M) const { … }
void AMDGPUTargetCodeGenInfo::emitTargetGlobals(
CodeGen::CodeGenModule &CGM) const { … }
void AMDGPUTargetCodeGenInfo::setTargetAttributes(
const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const { … }
unsigned AMDGPUTargetCodeGenInfo::getOpenCLKernelCallingConv() const { … }
llvm::Constant *AMDGPUTargetCodeGenInfo::getNullPointer(
const CodeGen::CodeGenModule &CGM, llvm::PointerType *PT,
QualType QT) const { … }
LangAS
AMDGPUTargetCodeGenInfo::getGlobalVarAddressSpace(CodeGenModule &CGM,
const VarDecl *D) const { … }
llvm::SyncScope::ID
AMDGPUTargetCodeGenInfo::getLLVMSyncScopeID(const LangOptions &LangOpts,
SyncScope Scope,
llvm::AtomicOrdering Ordering,
llvm::LLVMContext &Ctx) const { … }
void AMDGPUTargetCodeGenInfo::setTargetAtomicMetadata(
CodeGenFunction &CGF, llvm::AtomicRMWInst &RMW) const { … }
bool AMDGPUTargetCodeGenInfo::shouldEmitStaticExternCAliases() const { … }
bool AMDGPUTargetCodeGenInfo::shouldEmitDWARFBitFieldSeparators() const { … }
void AMDGPUTargetCodeGenInfo::setCUDAKernelCallingConvention(
const FunctionType *&FT) const { … }
llvm::Value *AMDGPUTargetCodeGenInfo::createEnqueuedBlockKernel(
CodeGenFunction &CGF, llvm::Function *Invoke, llvm::Type *BlockTy) const { … }
void CodeGenModule::handleAMDGPUFlatWorkGroupSizeAttr(
llvm::Function *F, const AMDGPUFlatWorkGroupSizeAttr *FlatWGS,
const ReqdWorkGroupSizeAttr *ReqdWGS, int32_t *MinThreadsVal,
int32_t *MaxThreadsVal) { … }
void CodeGenModule::handleAMDGPUWavesPerEUAttr(
llvm::Function *F, const AMDGPUWavesPerEUAttr *Attr) { … }
std::unique_ptr<TargetCodeGenInfo>
CodeGen::createAMDGPUTargetCodeGenInfo(CodeGenModule &CGM) { … }