[llvm-branch-commits] [clang] [Serialization] Code cleanups and polish 83233 (PR #83237)

Chuanqi Xu via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Oct 24 00:19:18 PDT 2024


ChuanqiXu9 wrote:

> > > do we store all template variable specializations in the same place in the map including the partial ones?
> > 
> > 
> > Yes, we identify if they are partial by an additional bit.
> > For the solution, given there might be other places need to load the specializations, how about removing the `OnlyPartial` part in `ASTReader::LoadExternalSpecializations(const Decl *D, bool OnlyPartial)`. So that although we have to call `findAll` in some cases, we won't call `findAll` again and again. We can remove the iterator after the first call.
> 
> We can probably split the partial ones from the others as they will probably be far less and iterating should be faster... I suspect we should somehow record if the partials were read the first time and don't decent into the map again...

That sounds like a good idea too.

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


More information about the llvm-branch-commits mailing list