aprantl added inline comments.

================
Comment at: lib/CodeGen/CGVTables.cpp:157
+  if (DebugInfo)
+    DebugInfo->replaceTemporaryNodes();
+
----------------
probinson wrote:
> aprantl wrote:
> > Have you looked at what it would take to only finalize the nodes reachable 
> > via the function?
> > Otherwise — have you audited that this is always safe?
> I do not know how to find nodes reachable from a particular function, either 
> before or after they are finalized.
> 
> GenerateVarArgsThunk is called after we do EmitGlobalFunctionDefinition on 
> the function we are about to clone.  The ReplaceMap holds replaceable forward 
> type declarations, I think?  So I can imagine that codegen for a subsequent 
> function might need to create a complete type, even one that is reachable 
> from the function we are about to clone.
> 
> Of course I find the whole metadata memory management scheme pretty opaque, 
> but this is my best guess about the situation.
Alternatively, would it be possible to instruct CloneFunction to not clone any 
temporary MDNodes via one of the flags that are passed to ValueMapper?


https://reviews.llvm.org/D37038



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

Reply via email to