[clang] [Clang] Track alloca element types to avoid getAllocatedType() calls (PR #181740)

Jameson Nash via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 22 17:02:05 PST 2026


================
@@ -948,15 +948,16 @@ void CGHLSLRuntime::emitEntryFunction(const FunctionDecl *FD,
     OB.emplace_back("convergencectrl", bundleArgs);
   }
 
-  llvm::DenseMap<const DeclaratorDecl *, llvm::Value *> OutputSemantic;
+  llvm::DenseMap<const DeclaratorDecl *, std::pair<llvm::Value *, llvm::Type *>>
----------------
vtjnash wrote:

There appears to be 0-2 or more entries (having sret does not imply that returning a value, or marking more than one argument as sret, is allowed to crash llvm).

I don't know why someone didn't use SmallDenseMap optimization, but that sort of change is not really fit to get bundled in this PR

https://github.com/llvm/llvm-project/pull/181740


More information about the cfe-commits mailing list