aprantl added inline comments.

================
Comment at: lib/CodeGen/CGDebugInfo.cpp:4537
+      CGM.getLangOpts().Optimize) {
+    for (auto &SP : DeclCache) {
+      auto *D = SP.first;
----------------
djtodoro wrote:
> aprantl wrote:
> > djtodoro wrote:
> > > aprantl wrote:
> > > > Just looking at the type declarations in CGDebugInfo.h: Why not iterate 
> > > > over the `SPCache`  directly? Shouldn't that contain all Function 
> > > > declarations only?
> > > I tried it, but `SPCache` is empty at this point.
> > Where is it emptied? Just grepping through CGDebugInfo did not make this 
> > obvious to me.
> The `SPCache` actually gets filled only in the case of `CXXMemberFunction`.
> In the other cases of `SP` production there is only filling of `DeclCache`.
> Should we use it like this or ?
If the number of entries in the DeclCache is much larger than the size of 
SPCache, we should keep them separate to speed up this loop. Otherwise we 
should join them to conserve memory.


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

https://reviews.llvm.org/D58035



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

Reply via email to