18#include "mlir/IR/Operation.h"
20#include "clang/AST/Attrs.inc"
30#include "llvm/Support/Casting.h"
31#include "llvm/Support/MemoryBuffer.h"
32#include "llvm/Support/VirtualFileSystem.h"
46 llvm::StringMap<mlir::Operation *> kernelHandles;
49 llvm::DenseMap<mlir::Operation *, mlir::Operation *> kernelStubs;
54 cir::CUDADeviceVarKind flags;
56 llvm::SmallVector<VarInfo, 16> deviceVars;
59 std::unique_ptr<MangleContext> deviceMC;
62 void emitDeviceStubBodyNew(CIRGenFunction &cgf, cir::FuncOp fn,
63 FunctionArgList &args);
64 void recordDeviceBinary();
65 void transformManagedVars();
66 mlir::Value prepareKernelArgs(CIRGenFunction &cgf, mlir::Location loc,
67 FunctionArgList &args);
68 mlir::Operation *getKernelHandle(cir::FuncOp fn, GlobalDecl gd)
override;
70 mlir::Operation *getKernelStub(mlir::Operation *handle)
override {
71 auto it = kernelStubs.find(handle);
72 assert(it != kernelStubs.end());
75 std::string addPrefixToName(StringRef funcName)
const;
76 std::string addUnderscoredPrefixToName(StringRef funcName)
const;
79 CIRGenNVCUDARuntime(CIRGenModule &cgm);
80 ~CIRGenNVCUDARuntime();
82 void emitDeviceStub(CIRGenFunction &cgf, cir::FuncOp fn,
83 FunctionArgList &args)
override;
85 void handleVarRegistration(
const VarDecl *vd, cir::GlobalOp var)
override;
86 void finalizeModule()
override;
87 void handleGlobalReplace(cir::GlobalOp oldGV, cir::GlobalOp newGV)
override;
89 void internalizeDeviceSideVar(
const VarDecl *d,
90 cir::GlobalLinkageKind &linkage)
override;
92 std::string getDeviceSideName(
const NamedDecl *nd)
override;
94 void registerDeviceVar(
const VarDecl *vd, cir::GlobalOp &var,
bool isExtern,
97 auto &builder = cgm.getBuilder();
98 var->setAttr(cir::CUDAVarRegistrationInfoAttr::getMnemonic(),
99 cir::CUDAVarRegistrationInfoAttr::get(
100 builder.getContext(),
102 cir::CUDADeviceVarKind::Variable, isExtern, isConstant,
106 deviceVars.push_back({
109 cir::CUDADeviceVarKind::Variable,
113 void registerDeviceSurf(
const VarDecl *vd, cir::GlobalOp &var,
bool isExtern,
115 auto &builder = cgm.getBuilder();
117 var->setAttr(cir::CUDAVarRegistrationInfoAttr::getMnemonic(),
118 cir::CUDAVarRegistrationInfoAttr::get(
119 builder.getContext(),
121 cir::CUDADeviceVarKind::Surface, isExtern,
126 deviceVars.push_back({
129 cir::CUDADeviceVarKind::Surface,
133 void registerDeviceTex(
const VarDecl *vd, cir::GlobalOp &var,
bool isExtern,
134 int32_t textureType,
bool normalized) {
135 auto &builder = cgm.getBuilder();
137 var->setAttr(cir::CUDAVarRegistrationInfoAttr::getMnemonic(),
138 cir::CUDAVarRegistrationInfoAttr::get(
139 builder.getContext(),
141 cir::CUDADeviceVarKind::Texture, isExtern,
143 false, textureType, normalized));
145 deviceVars.push_back({
148 cir::CUDADeviceVarKind::Texture,
155std::string CIRGenNVCUDARuntime::addPrefixToName(StringRef funcName)
const {
156 return (prefix + funcName).str();
160CIRGenNVCUDARuntime::addUnderscoredPrefixToName(StringRef funcName)
const {
161 return (
"__" + prefix + funcName).str();
164CIRGenNVCUDARuntime::CIRGenNVCUDARuntime(CIRGenModule &cgm)
165 : CIRGenCUDARuntime(cgm),
166 deviceMC(cgm.getASTContext().cudaNVInitDeviceMC()) {
168 cgm.
errorNYI(
"CIRGenNVCUDARuntime: Offload via LLVM");
175mlir::Value CIRGenNVCUDARuntime::prepareKernelArgs(
CIRGenFunction &cgf,
181 auto voidPtrArrayTy = cir::ArrayType::get(cgm.
voidPtrTy, args.size());
182 mlir::Value kernelArgs =
183 builder.
createAlloca(loc, cir::PointerType::get(voidPtrArrayTy),
186 mlir::Value kernelArgsDecayed =
187 builder.
createCast(cir::CastKind::array_to_ptrdecay, kernelArgs,
190 for (
const auto &[i, arg] : llvm::enumerate(args)) {
193 mlir::Value storePos =
198 builder.CIRBaseBuilderTy::createStore(loc, argAsVoid, storePos);
201 return kernelArgsDecayed;
206void CIRGenNVCUDARuntime::emitDeviceStubBodyNew(CIRGenFunction &cgf,
208 FunctionArgList &args) {
212 cgm.
errorNYI(
"CIRGenNVCUDARuntime: Offload via LLVM");
215 mlir::Location loc = fn.getLoc();
220 mlir::Value kernelArgs = prepareKernelArgs(cgf, loc, args);
237 std::string kernelLaunchAPI =
"LaunchKernel";
239 LangOptions::GPUDefaultStreamKind::PerThread) {
241 kernelLaunchAPI +=
"_spt";
243 kernelLaunchAPI +=
"_ptsz";
246 std::string launchKernelName = addPrefixToName(kernelLaunchAPI);
247 const IdentifierInfo &launchII =
249 FunctionDecl *cudaLaunchKernelFD =
nullptr;
250 for (NamedDecl *result : dc->
lookup(&launchII)) {
251 if (FunctionDecl *fd = dyn_cast<FunctionDecl>(result))
252 cudaLaunchKernelFD = fd;
255 if (cudaLaunchKernelFD ==
nullptr) {
257 "Can't find declaration for " + launchKernelName);
274 builder.
createAlloca(loc, cir::PointerType::get(dim3Ty),
"grid_dim",
277 builder.
createAlloca(loc, cir::PointerType::get(dim3Ty),
"block_dim",
282 loc, cir::PointerType::get(streamTy),
"stream", cgm.
getPointerAlign());
286 sharedMem.getType(), stream.getType()},
288 addUnderscoredPrefixToName(
"PopCallConfiguration"));
299 mlir::Value kernel = [&]() -> mlir::Value {
300 if (cir::GlobalOp globalOp = llvm::dyn_cast_or_null<cir::GlobalOp>(
301 kernelHandles[fn.getSymName()])) {
302 cir::PointerType kernelTy = cir::PointerType::get(globalOp.getSymType());
303 mlir::Value kernelVal = cir::GetGlobalOp::create(builder, loc, kernelTy,
304 globalOp.getSymName());
308 if (cir::FuncOp funcOp = llvm::dyn_cast_or_null<cir::FuncOp>(
309 kernelHandles[fn.getSymName()])) {
310 cir::PointerType kernelTy =
311 cir::PointerType::get(funcOp.getFunctionType());
312 mlir::Value kernelVal =
313 cir::GetGlobalOp::create(builder, loc, kernelTy, funcOp.getSymName());
317 llvm_unreachable(
"Expected stub handle to be cir::GlobalOp or FuncOp");
320 CallArgList launchArgs;
332 RValue::get(builder.CIRBaseBuilderTy::createLoad(loc, sharedMem)),
334 launchArgs.
add(
RValue::get(builder.CIRBaseBuilderTy::createLoad(loc, stream)),
337 mlir::Type launchTy =
341 const CIRGenFunctionInfo &callInfo =
344 ReturnValueSlot(), launchArgs,
false);
348 cgm.
errorNYI(
"MSVC CUDA stub handling");
351void CIRGenNVCUDARuntime::emitDeviceStub(CIRGenFunction &cgf, cir::FuncOp fn,
352 FunctionArgList &args) {
356 auto kernelNameAttr = cir::CUDAKernelNameAttr::get(
357 builder.getContext(), builder.getStringAttr(kernelName));
358 fn->setDiscardableAttr(cir::CUDAKernelNameAttr::getMnemonic(),
362 llvm::dyn_cast<cir::GlobalOp>(kernelHandles[fn.getSymName()])) {
363 mlir::Type fnPtrTy = globalOp.getSymType();
364 auto sym = mlir::FlatSymbolRefAttr::get(fn.getSymNameAttr());
365 auto gv = cir::GlobalViewAttr::get(fnPtrTy, sym);
367 globalOp->setAttr(
"initial_value", gv);
368 globalOp->setAttr(
"alignment", builder.getI64IntegerAttr(
373 globalOp.setLinkage(fn.getLinkage());
374 mlir::SymbolTable::setSymbolVisibility(
376 cgm.
setDSOLocal(
static_cast<mlir::Operation *
>(globalOp));
381 CudaFeature::CUDA_USES_NEW_LAUNCH) ||
384 emitDeviceStubBodyNew(cgf, fn, args);
386 cgm.
errorNYI(
"Emit Stub Body Legacy");
390 return new CIRGenNVCUDARuntime(cgm);
393CIRGenNVCUDARuntime::~CIRGenNVCUDARuntime() {}
395mlir::Operation *CIRGenNVCUDARuntime::getKernelHandle(cir::FuncOp fn,
399 auto it = kernelHandles.find(fn.getSymName());
400 if (it != kernelHandles.end()) {
401 mlir::Operation *oldHandle = it->second;
403 if (kernelStubs[oldHandle] == fn)
411 kernelStubs[oldHandle] = fn;
416 kernelStubs.erase(oldHandle);
421 kernelHandles[fn.getSymName()] = fn;
422 kernelStubs[fn] = fn;
430 cir::PointerType fnPtrTy = builder.
getPointerTo(fn.getFunctionType());
431 cir::GlobalOp globalOp =
434 globalOp->setAttr(
"alignment", builder.getI64IntegerAttr(
440 FunctionTemplateDecl *ft = fd->getPrimaryTemplate();
445 kernelHandles[fn.getSymName()] = globalOp;
446 kernelStubs[globalOp] = fn;
451void CIRGenNVCUDARuntime::internalizeDeviceSideVar(
452 const VarDecl *d, cir::GlobalLinkageKind &linkage) {
455 "internalizeDeviceSideVar: GPU Relocatable Device Code (RDC)");
462 if (d->
hasAttr<CUDADeviceAttr>() || d->
hasAttr<CUDAConstantAttr>() ||
463 d->
hasAttr<CUDASharedAttr>() ||
466 linkage = cir::GlobalLinkageKind::InternalLinkage;
470std::string CIRGenNVCUDARuntime::getDeviceSideName(
const NamedDecl *nd) {
473 if (
auto *fd = dyn_cast<FunctionDecl>(nd))
474 gd = GlobalDecl(fd, KernelReferenceKind::Kernel);
477 std::string deviceSideName;
484 SmallString<256> buffer;
485 llvm::raw_svector_ostream
out(buffer);
487 deviceSideName = std::string(
out.str());
494 SmallString<256> buffer;
495 llvm::raw_svector_ostream
out(buffer);
496 out << deviceSideName;
498 deviceSideName = std::string(
out.str());
500 return deviceSideName;
503void CIRGenNVCUDARuntime::handleVarRegistration(
const VarDecl *vd,
505 if (vd->
hasAttr<CUDADeviceAttr>() || vd->
hasAttr<CUDAConstantAttr>()) {
521 vd->
hasAttr<HIPManagedAttr>()) {
523 vd->
hasAttr<CUDAConstantAttr>());
530 const TemplateArgumentList &args = td->getTemplateArgs();
532 assert(args.
size() == 2 &&
533 "Unexpected number of template arguments of CUDA device "
534 "builtin surface type.");
536 llvm::APSInt surfaceType = args[1].getAsIntegral();
540 surfaceType.getSExtValue());
547 const TemplateArgumentList &args = td->getTemplateArgs();
549 assert(args.
size() == 3 &&
550 "Unexpected number of template arguments of CUDA device "
551 "builtin texture type.");
553 llvm::APSInt textureType = args[1].getAsIntegral();
554 llvm::APSInt normalized = args[2].getAsIntegral();
558 textureType.getSExtValue(), normalized.getZExtValue());
562void CIRGenNVCUDARuntime::handleGlobalReplace(cir::GlobalOp oldGV,
563 cir::GlobalOp newGV) {
564 for (
auto &info : deviceVars) {
565 if (
info.var == oldGV)
578 ->walk([](mlir::Operation *op) {
579 if (auto fn = mlir::dyn_cast<cir::FuncOp>(op);
580 fn && !fn.isDeclaration() &&
581 fn->hasAttr(cir::CUDAKernelNameAttr::getMnemonic()))
582 return mlir::WalkResult::interrupt();
583 if (op->hasAttr(cir::CUDAVarRegistrationInfoAttr::getMnemonic()))
584 return mlir::WalkResult::interrupt();
585 return mlir::WalkResult::advance();
596void CIRGenNVCUDARuntime::recordDeviceBinary() {
598 if (binaryName.empty())
602 if ((langOpts.HIP || !langOpts.GPURelocatableDeviceCode) &&
610 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> binaryOrErr =
611 fs.getBufferForFile(binaryName, -1,
613 if (std::error_code ec = binaryOrErr.getError()) {
615 << binaryName << ec.message();
623 StringRef
bytes = binaryOrErr.get()->getBuffer();
627 auto fatbinTy = cir::ArrayType::get(charTy,
bytes.size());
628 cgm.
getModule()->setAttr(cir::CIRDialect::getCUDADeviceBinaryAttrName(),
629 mlir::StringAttr::get(
bytes, fatbinTy));
633void CIRGenNVCUDARuntime::transformManagedVars() {
636 for (
auto &&info : deviceVars) {
638 if (
info.flags != cir::CUDADeviceVarKind::Variable ||
639 !
info.d->hasAttr<HIPManagedAttr>())
642 cir::PointerType varPtrTy =
646 cgm.
getLangOpts().CUDAIsDevice ? LangAS::cuda_device : LangAS::Default);
647 std::optional<mlir::SymbolTable::UseRange> uses =
var.getSymbolUses(module);
649 std::string
name =
var.getSymName().str();
651 std::optional<llvm::StringRef> comdat =
var.getComdat();
652 if (comdat && comdat->empty())
653 var.setComdat(llvm::StringRef(name));
655 var.setSymName(name +
".managed");
658 cir::GlobalOp managedVar =
661 managedVar.setLinkage(
var.getLinkage());
662 if (!
var.isDeclaration())
664 managedVar.setDsoLocal(
var.getDsoLocal());
665 managedVar.setGlobalVisibility(
var.getGlobalVisibility());
666 mlir::SymbolTable::setSymbolVisibility(
667 managedVar, mlir::SymbolTable::getSymbolVisibility(var));
669 cir::CUDAExternallyInitializedAttr::getMnemonic(),
673 cir::PointerType managedPtrTy =
674 builder.
getPointerTo(varPtrTy, managedVar.getAddrSpaceAttr());
675 for (mlir::SymbolTable::SymbolUse use : *uses) {
676 auto getGlobalOp = dyn_cast<cir::GetGlobalOp>(use.getUser());
679 "transformManagedVars: non-instruction use");
682 mlir::Value addr = getGlobalOp.getAddr();
683 addr.setType(managedPtrTy);
684 mlir::OpBuilder::InsertionGuard guard(builder);
685 builder.setInsertionPointAfter(getGlobalOp);
687 getGlobalOp.getLoc(), varPtrTy, addr,
689 addr.replaceAllUsesExcept(ld, ld.getDefiningOp());
700void CIRGenNVCUDARuntime::finalizeModule() {
701 transformManagedVars();
703 recordDeviceBinary();
717 for (
auto &&info : deviceVars) {
719 bool isDecl =
info.var.isDeclaration();
721 bool isVarOrSurfaceOrTexture = (
kind == cir::CUDADeviceVarKind::Variable ||
722 kind == cir::CUDADeviceVarKind::Surface ||
723 kind == cir::CUDADeviceVarKind::Texture);
724 bool isUsed =
info.d->isUsed();
725 bool hasUsedAttr =
info.d->hasAttr<UsedAttr>();
726 if (!isDecl && !isLocalLinkage && isVarOrSurfaceOrTexture && isUsed &&
728 if (
auto globalValue = mlir::dyn_cast<cir::CIRGlobalValueInterface>(
729 info.var.getOperation())) {
Defines the clang::ASTContext interface.
static StringRef bytes(const std::vector< T, Allocator > &v)
Provides definitions for the various language-specific address spaces.
static bool hasEntitiesToRegister(mlir::ModuleOp module)
Whether this translation unit has anything for the CUDA runtime to register.
Defines the clang::FileManager interface and associated types.
*collection of selector each with an associated kind and an ordered *collection of selectors A selector has a kind
Defines the SourceManager interface.
__CUDA_BUILTIN_VAR __cuda_builtin_blockDim_t blockDim
__CUDA_BUILTIN_VAR __cuda_builtin_gridDim_t gridDim
mlir::TypedAttr getConstNullPtrAttr(mlir::Type t)
mlir::Value createCast(mlir::Location loc, cir::CastKind kind, mlir::Value src, mlir::Type newTy)
cir::PtrStrideOp createPtrStride(mlir::Location loc, mlir::Value base, mlir::Value stride)
cir::PointerType getPointerTo(mlir::Type ty)
mlir::Value createAlloca(mlir::Location loc, cir::PointerType addrType, llvm::StringRef name, mlir::IntegerAttr alignment, mlir::Value dynAllocSize)
mlir::Value createBitcast(mlir::Value src, mlir::Type newTy)
SourceManager & getSourceManager()
TranslationUnitDecl * getTranslationUnitDecl() const
bool shouldExternalize(const Decl *D) const
Whether a C++ static variable or CUDA/HIP kernel should be externalized.
llvm::SetVector< const VarDecl * > CUDADeviceVarODRUsedByHost
Keep track of CUDA/HIP device-side variables ODR-used by host code.
const TargetInfo & getTargetInfo() const
mlir::Value getPointer() const
cir::LoadOp createAlignedLoad(mlir::Location loc, mlir::Type ty, mlir::Value ptr, llvm::MaybeAlign align)
cir::ConstantOp getConstInt(mlir::Location loc, llvm::APSInt intVal)
clang::MangleContext & getMangleContext()
Gets the mangle context.
static CIRGenCallee forDirect(mlir::Operation *funcPtr, const CIRGenCalleeInfo &abstractInfo=CIRGenCalleeInfo())
clang::GlobalDecl curGD
The GlobalDecl for the current function being compiled or the global variable currently being initial...
CIRGenTypes & getTypes() const
const clang::LangOptions & getLangOpts() const
const clang::Decl * curFuncDecl
Address getAddrOfLocalVar(const clang::VarDecl *vd)
Return the address of a local variable.
mlir::Value emitRuntimeCall(mlir::Location loc, cir::FuncOp callee, llvm::ArrayRef< mlir::Value > args={}, mlir::NamedAttrList attrs={})
RValue emitCall(const CIRGenFunctionInfo &funcInfo, const CIRGenCallee &callee, ReturnValueSlot returnValue, const CallArgList &args, cir::CIRCallOpInterface *callOp, bool isMustTail, SourceRange clangLoc)
This class organizes the cross-function state that is used while generating CIR code.
llvm::StringRef getMangledName(clang::GlobalDecl gd)
DiagnosticBuilder errorNYI(SourceLocation, llvm::StringRef)
Helpers to emit "not yet implemented" error diagnostics.
clang::ASTContext & getASTContext() const
void insertGlobalSymbol(mlir::Operation *op)
CIRGenBuilderTy & getBuilder()
void setDSOLocal(mlir::Operation *op) const
void setGVProperties(mlir::Operation *op, const NamedDecl *d) const
Set visibility, dllimport/dllexport and dso_local.
clang::DiagnosticsEngine & getDiags() const
static mlir::SymbolTable::Visibility getMLIRVisibilityFromCIRLinkage(cir::GlobalLinkageKind GLK)
const clang::TargetInfo & getTarget() const
void error(SourceLocation loc, llvm::StringRef error)
Emit a general error that something can't be done.
cir::FuncOp createRuntimeFunction(cir::FuncType ty, llvm::StringRef name, mlir::NamedAttrList extraAttrs={}, bool isLocal=false, bool assumeConvergent=false)
void eraseGlobalSymbol(mlir::Operation *op)
const clang::CodeGenOptions & getCodeGenOpts() const
const clang::LangOptions & getLangOpts() const
void printPostfixForExternalizedDecl(llvm::raw_ostream &os, const Decl *d)
Print the postfix for externalized static variable or kernels for single source offloading languages ...
cir::GlobalOp createGlobalOp(mlir::Location loc, llvm::StringRef name, mlir::Type t, bool isConstant=false, mlir::ptr::MemorySpaceAttrInterface addrSpace={}, mlir::Operation *insertPoint=nullptr)
mlir::ModuleOp getModule() const
void addCompilerUsedGlobal(cir::CIRGlobalValueInterface gv)
Add a global value to the llvmCompilerUsed list.
mlir::MLIRContext & getMLIRContext()
void maybeSetTrivialComdat(const clang::Decl &d, mlir::Operation *op)
CIRGenCXXABI & getCXXABI() const
const CIRGenFunctionInfo & arrangeFunctionDeclaration(const clang::FunctionDecl *fd)
Free functions are functions that are compatible with an ordinary C function pointer type.
mlir::Type convertType(clang::QualType type)
Convert a Clang type into a mlir::Type.
void add(RValue rvalue, clang::QualType type)
Type for representing both the decl and type of parameters to a function.
static RValue get(mlir::Value v)
static RValue getAggregate(Address addr, bool isVolatile=false)
Convert an Address to an RValue.
QuantityType getQuantity() const
Get the raw integer representation of this quantity.
static CharUnits fromQuantity(QuantityType Quantity)
Construct a CharUnits quantity from a raw integer type.
std::string OffloadBinaryToEmbedFile
Name of file passed with -foffload-include-binary option to forward to offloading runtime back-end fo...
lookup_result lookup(DeclarationName Name) const
lookup - Find the declarations (if any) with the given Name in this context.
SourceLocation getLocation() const
DiagnosticBuilder Report(SourceLocation Loc, unsigned DiagID)
Issue the message to the client.
llvm::vfs::FileSystem & getVirtualFileSystem() const
const ParmVarDecl * getParamDecl(unsigned i) const
bool isThisDeclarationADefinition() const
Returns whether this template declaration defines the primary pattern.
GlobalDecl - represents a global declaration.
GlobalDecl getWithKernelReferenceKind(KernelReferenceKind Kind)
const Decl * getDecl() const
StringRef getName() const
Return the actual identifier string.
IdentifierInfo & get(StringRef Name)
Return the identifier token info for the specified named identifier.
GPUDefaultStreamKind GPUDefaultStream
The default stream kind used for HIP kernel launching.
bool shouldMangleDeclName(const NamedDecl *D)
void mangleName(GlobalDecl GD, raw_ostream &)
IdentifierInfo * getIdentifier() const
Get the identifier that names this declaration, if there is one.
FileManager & getFileManager() const
bool isMicrosoft() const
Is this ABI an MSVC-compatible ABI?
TargetCXXABI getCXXABI() const
Get the C++ ABI currently in use.
unsigned getCharWidth() const
const llvm::VersionTuple & getSDKVersion() const
unsigned size() const
Retrieve the number of template arguments in this template argument list.
static DeclContext * castToDeclContext(const TranslationUnitDecl *D)
CXXRecordDecl * castAsCXXRecordDecl() const
bool isCUDADeviceBuiltinSurfaceType() const
Check if the type is the CUDA device builtin surface type.
bool isCUDADeviceBuiltinTextureType() const
Check if the type is the CUDA device builtin texture type.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
bool isInline() const
Whether this variable is (C++1z) inline.
bool hasExternalStorage() const
Returns true if a variable has extern or private_extern storage.
DefinitionKind hasDefinition(ASTContext &) const
Check whether this variable is defined in this translation unit.
static bool isLocalLinkage(GlobalLinkageKind linkage)
mlir::ptr::MemorySpaceAttrInterface toCIRAddressSpaceAttr(mlir::MLIRContext &ctx, clang::LangAS langAS)
Convert an AST LangAS to the appropriate CIR address space attribute interface.
CIRGenCUDARuntime * createNVCUDARuntime(CIRGenModule &cgm)
constexpr Variable var(Literal L)
Returns the variable of L.
@ Address
A pointer to a ValueDecl.
void info(bool Verbose, unsigned Level, const char *Fmt, Ts &&...Args)
Prints an indented note to stderr when Verbose is set.
Top level wrappers for InstallAPI frontend operations.
if(T->getSizeExpr()) TRY_TO(TraverseStmt(const_cast< Expr * >(T -> getSizeExpr())))
bool CudaFeatureEnabled(llvm::VersionTuple, CudaFeature)
U cast(CodeGen::Address addr)
__builtin_bitreverse32 uint32_t __builtin_riscv_aaddu_u32 __builtin_riscv_asubu_u32 int32_t
clang::CharUnits getPointerAlign() const
clang::CharUnits getSizeAlign() const
cir::PointerType voidPtrTy
void* in address space 0