[clang] [HLSL] Rewrite semantics parsing (PR #152537)

Chris B via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 14 06:47:07 PDT 2025


================
@@ -172,6 +193,9 @@ class CGHLSLRuntime {
   llvm::Triple::ArchType getArch();
 
   llvm::DenseMap<const clang::RecordType *, llvm::TargetExtType *> LayoutTypes;
+
+  std::unordered_set<std::string> ActiveInputSemantics;
----------------
llvm-beanz wrote:

> We never use containers like unordered_set because they are generally very expensive (each insertion requires a malloc).

(source: https://www.llvm.org/docs/ProgrammersManual.html#other-set-like-container-options)

This can probably instead be an `llvm::StringSet`, although I also don't see where these are used, so maybe we don't need them?

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


More information about the cfe-commits mailing list