clang 23.0.0git
WebAssemblyTargetCodeGenInfo Class Referencefinal
Inheritance diagram for WebAssemblyTargetCodeGenInfo:
[legend]

Public Member Functions

 WebAssemblyTargetCodeGenInfo (CodeGen::CodeGenTypes &CGT, WebAssemblyABIKind K)
void setTargetAttributes (const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const override
 setTargetAttributes - Provides a convenient hook to handle extra target-specific attributes for the given global.
virtual llvm::Type * getWasmExternrefReferenceType () const override
 Return the WebAssembly externref reference type.
virtual llvm::Type * getWasmFuncrefReferenceType () const override
 Return the WebAssembly funcref reference type.
Public Member Functions inherited from clang::CodeGen::TargetCodeGenInfo
 TargetCodeGenInfo (std::unique_ptr< ABIInfo > Info)
virtual ~TargetCodeGenInfo ()
const ABIInfogetABIInfo () const
 getABIInfo() - Returns ABI info helper for the target.
const SwiftABIInfogetSwiftABIInfo () const
 Returns Swift ABI info helper for the target.
virtual bool supportsLibCall () const
 supportsLibCall - Query to whether or not target supports all lib calls.
virtual void emitTargetMetadata (CodeGen::CodeGenModule &CGM, const llvm::MapVector< GlobalDecl, StringRef > &MangledDeclNames) const
 emitTargetMetadata - Provides a convenient hook to handle extra target-specific metadata for the given globals.
virtual void emitTargetGlobals (CodeGen::CodeGenModule &CGM) const
 Provides a convenient hook to handle extra target-specific globals.
virtual void checkFunctionABI (CodeGenModule &CGM, const FunctionDecl *Decl) const
 Any further codegen related checks that need to be done on a function signature in a target specific manner.
virtual void checkFunctionCallABI (CodeGenModule &CGM, SourceLocation CallLoc, const FunctionDecl *Caller, const FunctionDecl *Callee, const CallArgList &Args, QualType ReturnType) const
 Any further codegen related checks that need to be done on a function call in a target specific manner.
virtual bool wouldInliningViolateFunctionCallABI (const FunctionDecl *Caller, const FunctionDecl *Callee) const
 Returns true if inlining the function call would produce incorrect code for the current target and should be ignored (even with the always_inline or flatten attributes).
virtual unsigned getSizeOfUnwindException () const
 Determines the size of struct _Unwind_Exception on this platform, in 8-bit units.
virtual bool extendPointerWithSExt () const
 Controls whether __builtin_extend_pointer should sign-extend pointers to uint64_t or zero-extend them (the default).
virtual int getDwarfEHStackPointer (CodeGen::CodeGenModule &M) const
 Determines the DWARF register number for the stack pointer, for exception-handling purposes.
virtual bool initDwarfEHRegSizeTable (CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const
 Initializes the given DWARF EH register-size table, a char*.
virtual llvm::Value * decodeReturnAddress (CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const
 Performs the code-generation required to convert a return address as stored by the system into the actual address of the next instruction that will be executed.
virtual llvm::Value * encodeReturnAddress (CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const
 Performs the code-generation required to convert the address of an instruction into a return address suitable for storage by the system in a return slot.
virtual llvm::Value * testFPKind (llvm::Value *V, unsigned BuiltinID, CGBuilderTy &Builder, CodeGenModule &CGM) const
 Performs a target specific test of a floating point value for things like IsNaN, Infinity, ... Nullptr is returned if no implementation exists.
virtual llvm::Type * adjustInlineAsmType (CodeGen::CodeGenFunction &CGF, StringRef Constraint, llvm::Type *Ty) const
 Corrects the low-level LLVM type for a given constraint and "usual" type.
virtual bool isScalarizableAsmOperand (CodeGen::CodeGenFunction &CGF, llvm::Type *Ty) const
 Target hook to decide whether an inline asm operand can be passed by value.
virtual void addReturnRegisterOutputs (CodeGen::CodeGenFunction &CGF, CodeGen::LValue ReturnValue, std::string &Constraints, std::vector< llvm::Type * > &ResultRegTypes, std::vector< llvm::Type * > &ResultTruncRegTypes, std::vector< CodeGen::LValue > &ResultRegDests, std::string &AsmString, unsigned NumOutputs) const
 Adds constraints and types for result registers.
virtual bool doesReturnSlotInterfereWithArgs () const
 doesReturnSlotInterfereWithArgs - Return true if the target uses an argument slot for an 'sret' type.
virtual StringRef getARCRetainAutoreleasedReturnValueMarker () const
 Retrieve the address of a function to call immediately before calling objc_retainAutoreleasedReturnValue.
virtual bool markARCOptimizedReturnCallsAsNoTail () const
 Determine whether a call to objc_retainAutoreleasedReturnValue or objc_unsafeClaimAutoreleasedReturnValue should be marked as 'notail'.
virtual llvm::Constant * getUBSanFunctionSignature (CodeGen::CodeGenModule &CGM) const
 Return a constant used by UBSan as a signature to identify functions possessing type information, or 0 if the platform is unsupported.
virtual bool isNoProtoCallVariadic (const CodeGen::CallArgList &args, const FunctionNoProtoType *fnType) const
 Determine whether a call to an unprototyped functions under the given calling convention should use the variadic convention or the non-variadic convention.
virtual void getDependentLibraryOption (llvm::StringRef Lib, llvm::SmallString< 24 > &Opt) const
 Gets the linker options necessary to link a dependent library on this platform.
virtual void getDetectMismatchOption (llvm::StringRef Name, llvm::StringRef Value, llvm::SmallString< 32 > &Opt) const
 Gets the linker options necessary to detect object file mismatches on this platform.
virtual unsigned getDeviceKernelCallingConv () const
 Get LLVM calling convention for device kernels.
virtual llvm::Constant * getNullPointer (const CodeGen::CodeGenModule &CGM, llvm::PointerType *T, QualType QT) const
 Get target specific null pointer.
virtual LangAS getGlobalVarAddressSpace (CodeGenModule &CGM, const VarDecl *D) const
 Get target favored AST address space of a global variable for languages other than OpenCL and CUDA.
virtual LangAS getASTAllocaAddressSpace () const
 Get the AST address space for alloca.
virtual LangAS getAddrSpaceOfCxaAtexitPtrParam () const
 Get address space of pointer parameter for __cxa_atexit.
virtual StringRef getLLVMSyncScopeStr (const LangOptions &LangOpts, SyncScope Scope, llvm::AtomicOrdering Ordering) const
 Get the syncscope used in LLVM IR as a string.
llvm::SyncScope::ID getLLVMSyncScopeID (const LangOptions &LangOpts, SyncScope Scope, llvm::AtomicOrdering Ordering, llvm::LLVMContext &Ctx) const
 Get the syncscope used in LLVM IR as a SyncScope ID.
virtual void setTargetAtomicMetadata (CodeGenFunction &CGF, llvm::Instruction &AtomicInst, const AtomicExpr *Expr=nullptr) const
 Allow the target to apply other metadata to an atomic instruction.
virtual TargetOpenCLBlockHelpergetTargetOpenCLBlockHelper () const
virtual llvm::Value * createEnqueuedBlockKernel (CodeGenFunction &CGF, llvm::Function *BlockInvokeFunc, llvm::Type *BlockTy) const
 Create an OpenCL kernel for an enqueued block.
virtual bool shouldEmitStaticExternCAliases () const
virtual bool shouldEmitDWARFBitFieldSeparators () const
virtual void setCUDAKernelCallingConvention (const FunctionType *&FT) const
virtual void setOCLKernelStubCallingConvention (const FunctionType *&FT) const
virtual llvm::Type * getCUDADeviceBuiltinSurfaceDeviceType () const
 Return the device-side type for the CUDA device builtin surface type.
virtual llvm::Type * getCUDADeviceBuiltinTextureDeviceType () const
 Return the device-side type for the CUDA device builtin texture type.
virtual bool emitCUDADeviceBuiltinSurfaceDeviceCopy (CodeGenFunction &CGF, LValue Dst, LValue Src) const
 Emit the device-side copy of the builtin surface type.
virtual bool emitCUDADeviceBuiltinTextureDeviceCopy (CodeGenFunction &CGF, LValue Dst, LValue Src) const
 Emit the device-side copy of the builtin texture type.
virtual llvm::Type * getOpenCLType (CodeGenModule &CGM, const Type *T) const
 Return an LLVM type that corresponds to an OpenCL type.
virtual llvm::Type * getHLSLType (CodeGenModule &CGM, const Type *T, const CGHLSLOffsetInfo &OffsetInfo) const
 Return an LLVM type that corresponds to a HLSL type.
virtual llvm::Type * getHLSLPadding (CodeGenModule &CGM, CharUnits NumBytes) const
 Return an LLVM type that corresponds to padding in HLSL types.
virtual bool isHLSLPadding (llvm::Type *Ty) const
 Return true if this is an HLSL padding type.

Additional Inherited Members

Static Public Member Functions inherited from clang::CodeGen::TargetCodeGenInfo
static void setBranchProtectionFnAttributes (const TargetInfo::BranchProtectionInfo &BPI, llvm::Function &F)
static void initBranchProtectionFnAttributes (const TargetInfo::BranchProtectionInfo &BPI, llvm::AttrBuilder &FuncAttrs)
static void setPointerAuthFnAttributes (const PointerAuthOptions &Opts, llvm::Function &F)
static void initPointerAuthFnAttributes (const PointerAuthOptions &Opts, llvm::AttrBuilder &FuncAttrs)
Protected Member Functions inherited from clang::CodeGen::TargetCodeGenInfo
template<typename T>
const T & getABIInfo () const
void addStackProbeTargetAttributes (const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const
Static Protected Member Functions inherited from clang::CodeGen::TargetCodeGenInfo
static std::string qualifyWindowsLibrary (StringRef Lib)
Protected Attributes inherited from clang::CodeGen::TargetCodeGenInfo
std::unique_ptr< SwiftABIInfoSwiftInfo

Detailed Description

Definition at line 48 of file WebAssembly.cpp.

Constructor & Destructor Documentation

◆ WebAssemblyTargetCodeGenInfo()

WebAssemblyTargetCodeGenInfo::WebAssemblyTargetCodeGenInfo ( CodeGen::CodeGenTypes & CGT,
WebAssemblyABIKind K )
inlineexplicit

Member Function Documentation

◆ getWasmExternrefReferenceType()

virtual llvm::Type * WebAssemblyTargetCodeGenInfo::getWasmExternrefReferenceType ( ) const
inlineoverridevirtual

Return the WebAssembly externref reference type.

Reimplemented from clang::CodeGen::TargetCodeGenInfo.

Definition at line 89 of file WebAssembly.cpp.

References clang::CodeGen::TargetCodeGenInfo::getABIInfo().

◆ getWasmFuncrefReferenceType()

virtual llvm::Type * WebAssemblyTargetCodeGenInfo::getWasmFuncrefReferenceType ( ) const
inlineoverridevirtual

Return the WebAssembly funcref reference type.

Reimplemented from clang::CodeGen::TargetCodeGenInfo.

Definition at line 93 of file WebAssembly.cpp.

References clang::CodeGen::TargetCodeGenInfo::getABIInfo().

◆ setTargetAttributes()

void WebAssemblyTargetCodeGenInfo::setTargetAttributes ( const Decl * D,
llvm::GlobalValue * GV,
CodeGen::CodeGenModule & M ) const
inlineoverridevirtual

setTargetAttributes - Provides a convenient hook to handle extra target-specific attributes for the given global.

Reimplemented from clang::CodeGen::TargetCodeGenInfo.

Definition at line 57 of file WebAssembly.cpp.

References clang::cast(), and clang::CodeGen::TargetCodeGenInfo::setTargetAttributes().


The documentation for this class was generated from the following file: