hliao added inline comments.

================
Comment at: clang/include/clang/AST/DeclCXX.h:395-400
     /// The number used to indicate this lambda expression for name
     /// mangling in the Itanium C++ ABI.
     unsigned ManglingNumber : 31;
 
+    /// The device side mangling number.
+    unsigned DeviceManglingNumber = 0;
----------------
rnk wrote:
> It seems a shame to grow LambdaDefinitionData by a pointer for all users of 
> C++ that do not use CUDA. Optimizing bitfields may be worth the time, but 
> I'll leave it to @rjmccall or @rsmith to give guidance on whether that's 
> worth it.
> 
> An alternative would be to store the device numbers in the mangling context 
> and look them up when needed, since they are so rarely needed.
I like the alternative way by storing all numbering into the mangle/numbering 
context instead of AST itself. But, it needs additional numbering 
post-processing after AST importing. Sound to me a major refactoring work 
likely to be addressed later.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69322/new/

https://reviews.llvm.org/D69322



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to