[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)
Justin Bogner via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 6 15:45:14 PDT 2024
================
@@ -879,6 +879,10 @@ static TargetTypeInfo getTargetTypeInfo(const TargetExtType *Ty) {
ScalableVectorType::get(Type::getInt8Ty(C), TotalNumElts));
}
+ // DirectX intangible types
+ if (Name.starts_with("dx."))
+ return TargetTypeInfo(PointerType::get(C, 0), TargetExtType::CanBeGlobal);
----------------
bogner wrote:
`CanBeGlobal` says that this type can be used for a global. It's not clear to me if we need that for it to be a member of a global (as in a global `RWBuffer`) so I'm not sure if we want it or not. @hekota do you know if we need this? If it's here just in case let's drop it for now and add it when we need it.
I'm pretty sure we don't want `HasZeroInit` - the only way we want to be able to get these types is from the handle creation intrinsics, so zero initialization for them doesn't make sense.
https://github.com/llvm/llvm-project/pull/104856
More information about the cfe-commits
mailing list