[PATCH] D58035: [clang/DIVar] Emit flag for params that have unchanged values

Adrian Prantl via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 17 09:57:36 PDT 2019


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





More information about the cfe-commits mailing list