This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [debug-early] C++ clones and limbo DIEs


On 01/30/2015 03:36 PM, Aldy Hernandez wrote:
  /* It is possible to have both DECL_ABSTRACT_P and DECLARATION be true if we
     started to generate the abstract instance of an inline, decided to output
     its containing class, and proceeded to emit the declaration of the inline
     from the member list for the class.  If so, DECLARATION takes priority;
     we'll get back to the abstract instance when done with the class.  */

This comment is out of date; in this case decl_ultimate_origin will return NULL_TREE, so origin is null, so we shouldn't need to deal with this here.

+  /* ?? We must not reset `origin', so C++ clones get a proper
+     DW_AT_abstract_origin tagged DIE further on.  */
+#if 0
   /* The class-scope declaration DIE must be the primary DIE.  */
   if (origin && declaration && class_or_namespace_scope_p (context_die))
     {
       origin = NULL;
       gcc_assert (!old_die);
     }
+#endif

So I think this block is unnecessary.

Obviously, now we will get more DIEs than before (complete constructors, base constructors, and what have yous).  Whereas previously we only generated a DIE for the used ones.

Hmm, that's unfortunate.

What if we leave the clone skipping alone here and emit early debug about all reachable functions in symbol_table::finalize_compilation_unit, between analyze_functions() and compile()?

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]