================
@@ -64,6 +64,10 @@ class SemaHLSL : public SemaBase {
 
   // HLSL Type trait implementations
   bool IsScalarizedLayoutCompatible(QualType T1, QualType T2) const;
+  bool IsIntangibleType(const QualType T1);
+
+private:
+  llvm::DenseMap<const Type *, bool> IsIntangibleTypeCache;
----------------
llvm-beanz wrote:

This is an odd way to cache the result. Generally other similar things get 
cached on the RecordDecl (see: 
https://github.com/llvm/llvm-project/blob/66927fb95abef9327b453d7213c5df7d641269be/clang/include/clang/AST/DeclBase.h#L1620),
 and for non-Record objects it is fast to re-compute. That should be way faster 
and less memory intensive than storing a `DenseMap`.

https://github.com/llvm/llvm-project/pull/104544
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to