clang 23.0.0git
CIRGenTypes.cpp File Reference
#include "CIRGenTypes.h"
#include "CIRGenCXXABI.h"
#include "CIRGenFunctionInfo.h"
#include "CIRGenModule.h"
#include "mlir/IR/BuiltinTypes.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/GlobalDecl.h"
#include "clang/AST/Type.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/CIR/Dialect/IR/CIRTypes.h"
#include <cassert>
#include "clang/Basic/AMDGPUTypes.def"

Go to the source code of this file.

Macros

#define AMDGPU_OPAQUE_PTR_TYPE(Name, Id, SingletonId, Width, Align, AS)
#define AMDGPU_NAMED_BARRIER_TYPE(Name, Id, SingletonId, Width, Align, Scope)
#define AMDGPU_TYPE(Name, Id, SingletonId, Width, Align)

Functions

static bool isSafeToConvert (QualType qt, CIRGenTypes &cgt, llvm::SmallPtrSetImpl< const RecordDecl * > &alreadyChecked)
 Return true if it is safe to convert this field type, which requires the record elements contained by-value to all be recursively safe to convert.
static bool isSafeToConvert (const RecordDecl *rd, CIRGenTypes &cgt, llvm::SmallPtrSetImpl< const RecordDecl * > &alreadyChecked)
 Return true if it is safe to convert the specified record decl to CIR and lay it out, false if doing so would cause us to get into a recursive compilation mess.
static bool isSafeToConvert (const RecordDecl *rd, CIRGenTypes &cgt)

Macro Definition Documentation

◆ AMDGPU_NAMED_BARRIER_TYPE

#define AMDGPU_NAMED_BARRIER_TYPE ( Name,
Id,
SingletonId,
Width,
Align,
Scope )
Value:
case BuiltinType::Id: \
llvm_unreachable("NYI");

◆ AMDGPU_OPAQUE_PTR_TYPE

#define AMDGPU_OPAQUE_PTR_TYPE ( Name,
Id,
SingletonId,
Width,
Align,
AS )
Value:
case BuiltinType::Id: { \
if (BuiltinType::Id == BuiltinType::AMDGPUTexture) { \
resultType = cir::VectorType::get(builder.getSInt32Ty(), 8); \
} else { \
resultType = builder.getPointerTo(cgm.voidTy); \
} \
break; \
}

◆ AMDGPU_TYPE

#define AMDGPU_TYPE ( Name,
Id,
SingletonId,
Width,
Align )
Value:
case BuiltinType::Id: \
llvm_unreachable("NYI");

Function Documentation

◆ isSafeToConvert() [1/3]

bool isSafeToConvert ( const RecordDecl * rd,
CIRGenTypes & cgt )
static

◆ isSafeToConvert() [2/3]

bool isSafeToConvert ( const RecordDecl * rd,
CIRGenTypes & cgt,
llvm::SmallPtrSetImpl< const RecordDecl * > & alreadyChecked )
static

◆ isSafeToConvert() [3/3]

bool isSafeToConvert ( QualType qt,
CIRGenTypes & cgt,
llvm::SmallPtrSetImpl< const RecordDecl * > & alreadyChecked )
static

Return true if it is safe to convert this field type, which requires the record elements contained by-value to all be recursively safe to convert.

Definition at line 197 of file CIRGenTypes.cpp.

References clang::Type::getAs(), clang::ASTContext::getAsArrayType(), clang::Type::getAsRecordDecl(), clang::CIRGen::CIRGenTypes::getASTContext(), and isSafeToConvert().

Referenced by clang::CIRGen::CIRGenTypes::convertRecordDeclType(), isSafeToConvert(), isSafeToConvert(), and isSafeToConvert().