|
clang 24.0.0git
|
#include "CGBuiltin.h"#include "CGHLSLRuntime.h"#include "CodeGenFunction.h"#include "clang/AST/HLSLResource.h"#include "clang/AST/MatrixUtils.h"#include "llvm/ADT/STLExtras.h"#include "llvm/IR/MatrixBuilder.h"#include "llvm/Support/DXILABI.h"Go to the source code of this file.
Functions | |
| static uint64_t | getEffectiveBarrierMemoryFlags (uint64_t MemoryFlags, llvm::Triple::EnvironmentType Stage) |
| static Value * | handleAsDoubleBuiltin (CodeGenFunction &CGF, const CallExpr *E) |
| static Value * | handleHlslClip (const CallExpr *E, CodeGenFunction *CGF) |
| static Value * | handleHlslSplitdouble (const CallExpr *E, CodeGenFunction *CGF) |
| static Value * | handleHlslWaveActiveBallot (CodeGenFunction &CGF, const CallExpr *E) |
| static Value * | handleElementwiseF16ToF32 (CodeGenFunction &CGF, const CallExpr *E) |
| static Value * | handleElementwiseF32ToF16 (CodeGenFunction &CGF, const CallExpr *E) |
| static llvm::SyncScope::ID | getHLSLAtomicScope (CodeGenFunction &CGF, const LValue &DestLV) |
| static Address | getHLSLAtomicDestAddr (CodeGenFunction &CGF, const LValue &DestLV) |
| static LValue | getHLSLAtomicOriginalValueLValue (CodeGenFunction &CGF, const Expr *E, CallArgList &Args) |
| static Value * | handleInterlockedOp (CodeGenFunction &CGF, const CallExpr *E, llvm::AtomicRMWInst::BinOp Op) |
| static Value * | handleInterlockedCompareOp (CodeGenFunction &CGF, const CallExpr *E) |
| static Value * | emitBufferStride (CodeGenFunction *CGF, const Expr *HandleExpr, LValue &Stride) |
| static Intrinsic::ID | getDotProductIntrinsic (CGHLSLRuntime &RT, QualType QT) |
| static Intrinsic::ID | getFirstBitHighIntrinsic (CGHLSLRuntime &RT, QualType QT) |
| static Intrinsic::ID | getWaveActiveSumIntrinsic (llvm::Triple::ArchType Arch, QualType QT) |
| static Intrinsic::ID | getWaveActiveProductIntrinsic (llvm::Triple::ArchType Arch, QualType QT) |
| static Intrinsic::ID | getPrefixCountBitsIntrinsic (llvm::Triple::ArchType Arch) |
| static Intrinsic::ID | getWavePrefixSumIntrinsic (llvm::Triple::ArchType Arch, QualType QT) |
| static Intrinsic::ID | getWavePrefixProductIntrinsic (llvm::Triple::ArchType Arch, QualType QT) |
| static std::string | getSpecConstantFunctionName (clang::QualType SpecConstantType, ASTContext &Context) |
| static const HLSLAttributedResourceType * | getHandleAttributedType (QualType HandleQT) |
| static const HLSLAttributedResourceType * | getRequiredHandleType (const CallExpr *E, unsigned ArgNo) |
| static const FieldDecl * | getResourceHandleField (QualType ResourceTy) |
| static llvm::Type * | getOffsetType (CodeGenModule &CGM, const HLSLAttributedResourceType *RT) |
| static Value * | emitHlslOffset (CodeGenFunction &CGF, const CallExpr *E, unsigned OffsetArgIndex, llvm::Type *OffsetTy) |
| static Value * | emitHlslSampleOffset (CodeGenFunction &CGF, const CallExpr *E, const HLSLAttributedResourceType *RT, unsigned OffsetArgIndex) |
| static unsigned | getHlslClampArgIndex (const HLSLAttributedResourceType *RT, unsigned OffsetArgIndex) |
| static Value * | emitGetDimensions (CodeGenFunction &CGF, const CallExpr *E, unsigned IntrinsicID, unsigned NumRetComps, bool HasLod) |
| static llvm::Type * | getAggregateType (llvm::Type *ScalarTy, QualType ArgTy) |
|
static |
Definition at line 455 of file CGHLSLBuiltins.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::cast(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::Expr::getType(), clang::QualType::getTypePtr(), and clang::CodeGen::CodeGenFunction::getTypeSize().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 667 of file CGHLSLBuiltins.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CallExpr::getArg(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::Expr::getType(), clang::Value::getType(), and clang::Type::isFloatingType().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 643 of file CGHLSLBuiltins.cpp.
References clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CallExpr::getArg(), and clang::CallExpr::getNumArgs().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr(), and emitHlslSampleOffset().
|
static |
Definition at line 651 of file CGHLSLBuiltins.cpp.
References clang::CodeGen::CodeGenFunction::CGM, emitHlslOffset(), getOffsetType(), and clang::hlsl::hasResourceOffset().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 698 of file CGHLSLBuiltins.cpp.
References clang::Type::getAs().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 466 of file CGHLSLBuiltins.cpp.
References clang::Type::isFloatingType(), clang::Type::isSignedIntegerType(), and clang::Type::isUnsignedIntegerType().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 27 of file CGHLSLBuiltins.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 475 of file CGHLSLBuiltins.cpp.
References clang::Type::hasSignedIntegerRepresentation(), and clang::Type::hasUnsignedIntegerRepresentation().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 604 of file CGHLSLBuiltins.cpp.
References clang::Type::getAs(), and clang::QualType::getTypePtr().
Referenced by getRequiredHandleType().
|
static |
Definition at line 351 of file CGHLSLBuiltins.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::cast(), clang::CodeGen::CGBuilderTy::CreateGEP(), clang::CodeGen::CodeGenFunction::getAccessedFieldNo(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CodeGenTypeCache::SizeTy, and clang::CodeGen::Address::withElementType().
Referenced by handleInterlockedCompareOp(), and handleInterlockedOp().
|
static |
Definition at line 374 of file CGHLSLBuiltins.cpp.
References clang::CodeGen::CodeGenFunction::EmitHLSLOutArgExpr(), and clang::CodeGen::CodeGenFunction::EmitLValue().
Referenced by handleInterlockedCompareOp(), and handleInterlockedOp().
|
static |
Definition at line 339 of file CGHLSLBuiltins.cpp.
References clang::CodeGen::CodeGenFunction::getLLVMContext(), and clang::hlsl_groupshared.
Referenced by handleInterlockedCompareOp(), and handleInterlockedOp().
|
static |
Definition at line 660 of file CGHLSLBuiltins.cpp.
References clang::hlsl::hasResourceOffset().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 632 of file CGHLSLBuiltins.cpp.
References clang::hlsl::getResourceDimensions(), and clang::CodeGen::CodeGenTypeCache::Int32Ty.
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr(), and emitHlslSampleOffset().
|
static |
Definition at line 518 of file CGHLSLBuiltins.cpp.
References Arch.
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 616 of file CGHLSLBuiltins.cpp.
References clang::CallExpr::getArg(), getHandleAttributedType(), and clang::Expr::getType().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
Definition at line 620 of file CGHLSLBuiltins.cpp.
References clang::IdentifierTable::get(), clang::Type::getAsCXXRecordDecl(), clang::Decl::getASTContext(), clang::ASTContext::Idents, and clang::DeclContext::lookup().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 567 of file CGHLSLBuiltins.cpp.
References clang::FunctionDecl::Create(), clang::ParmVarDecl::Create(), clang::SC_Extern, and clang::SC_None.
Referenced by clang::CodeGen::CodeGenFunction::getSpecConstantFunction().
|
static |
Definition at line 502 of file CGHLSLBuiltins.cpp.
References Arch, and clang::Type::isUnsignedIntegerType().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 485 of file CGHLSLBuiltins.cpp.
References Arch, and clang::Type::isUnsignedIntegerType().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 549 of file CGHLSLBuiltins.cpp.
References Arch, and clang::Type::isUnsignedIntegerType().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 532 of file CGHLSLBuiltins.cpp.
References Arch, and clang::Type::isUnsignedIntegerType().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 48 of file CGHLSLBuiltins.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenTypeCache::DoubleTy, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CallExpr::getArg(), clang::Type::getAs(), clang::CodeGen::CodeGenModule::getTarget(), clang::TargetInfo::getTriple(), clang::Expr::getType(), clang::Type::hasUnsignedIntegerRepresentation(), and clang::Type::isVectorType().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 233 of file CGHLSLBuiltins.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::Type::castAs(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenTypeCache::FloatTy, clang::CallExpr::getArg(), clang::CodeGen::CodeGenModule::getTriple(), clang::Expr::getType(), clang::Value::getType(), and clang::Type::hasUnsignedIntegerRepresentation().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 284 of file CGHLSLBuiltins.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::Type::castAs(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenTypeCache::FloatTy, clang::CallExpr::getArg(), clang::CodeGen::CodeGenModule::getTriple(), clang::Expr::getType(), clang::Value::getType(), clang::Type::hasFloatingRepresentation(), and clang::CodeGen::CodeGenTypeCache::IntTy.
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 83 of file CGHLSLBuiltins.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, Constant, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CodeGenFunction::CurFn, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenTypeCache::FloatTy, clang::CallExpr::getArg(), clang::Type::getAs(), clang::CodeGen::CodeGenModule::getHLSLRuntime(), clang::CodeGen::CodeGenModule::getTarget(), clang::TargetInfo::getTriple(), and clang::Expr::getType().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 122 of file CGHLSLBuiltins.cpp.
References clang::TargetCXXABI::areArgsDestroyedLeftToRightInCallee(), clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenFunction::EmitHLSLOutArgExpr(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitWritebacks(), clang::CallExpr::getArg(), clang::Type::getAs(), clang::TargetInfo::getCXXABI(), clang::CodeGen::CodeGenFunction::getTarget(), clang::CodeGen::CodeGenModule::getTarget(), clang::TargetInfo::getTriple(), clang::Expr::getType(), clang::Value::getType(), clang::CodeGen::CodeGenTypeCache::Int32Ty, and clang::CodeGen::CallArgList::reverseWritebacks().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 199 of file CGHLSLBuiltins.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitIntrinsicCall(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CallExpr::getArg(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::CodeGen::CodeGenModule::getTarget(), clang::TargetInfo::getTriple(), clang::Value::getType(), and clang::CodeGen::CodeGenTypeCache::Int32Ty.
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 415 of file CGHLSLBuiltins.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateAtomicCmpXchg(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(), clang::CodeGen::CodeGenFunction::EmitWritebacks(), clang::CodeGen::RValue::get(), clang::CallExpr::getArg(), getHLSLAtomicDestAddr(), getHLSLAtomicOriginalValueLValue(), getHLSLAtomicScope(), clang::CallExpr::getNumArgs(), and clang::CodeGen::Address::withElementType().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().
|
static |
Definition at line 382 of file CGHLSLBuiltins.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::Call, clang::CodeGen::CGBuilderTy::CreateAtomicRMW(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(), clang::CodeGen::CodeGenFunction::EmitWritebacks(), clang::CodeGen::RValue::get(), clang::CallExpr::getArg(), getHLSLAtomicDestAddr(), getHLSLAtomicOriginalValueLValue(), getHLSLAtomicScope(), clang::CallExpr::getNumArgs(), clang::Expr::getType(), clang::Type::isFloatingType(), and clang::Type::isIntegerType().
Referenced by clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr().