Message ID | 5564A158.8010604@redhat.com |
---|---|
State | New |
Headers | show |
OK, I see the issue. We're calling debug_abstract_function to build debug info for the abstract instance of a function that we already built from dwarf2out_early_global_decl. It occurs to me that the early-dwarf work should make debug_abstract_function and most of the DECL_ABSTRACT handling obsolete. All we need to do is set DW_AT_inline during early debug and update it during late debug if the function is inlined. Jason
On 05/27/2015 03:34 PM, Jason Merrill wrote: > It occurs to me that the early-dwarf work should make > debug_abstract_function and most of the DECL_ABSTRACT handling obsolete. > All we need to do is set DW_AT_inline during early debug and update it > during late debug if the function is inlined. This is certainly a cool idea. I played around with this, and I think we should be able to get it to work. However, this won't work for the LTO case, because dwarf2out currently works just as our pre-debug-early world did. We don't have an early DIE we can annotate later. At least, until we get Richi's DIE streaming idea working. We could temporarily make the LTO case behave like early-debug by emitting early DIEs after LTO stream in-- while we get DIE streaming implemented, or we could leave the DECL_ABSTRACT redesign post-richi-streaming. I'm leaning towards the latter. Thoughts?
On Wed, Jun 3, 2015 at 3:04 PM, Aldy Hernandez <aldyh@redhat.com> wrote: > On 05/27/2015 03:34 PM, Jason Merrill wrote: > >> It occurs to me that the early-dwarf work should make >> debug_abstract_function and most of the DECL_ABSTRACT handling obsolete. >> All we need to do is set DW_AT_inline during early debug and update it >> during late debug if the function is inlined. > > > This is certainly a cool idea. I played around with this, and I think we > should be able to get it to work. However, this won't work for the LTO > case, because dwarf2out currently works just as our pre-debug-early world > did. We don't have an early DIE we can annotate later. At least, until we > get Richi's DIE streaming idea working. > > We could temporarily make the LTO case behave like early-debug by emitting > early DIEs after LTO stream in-- while we get DIE streaming implemented, or > we could leave the DECL_ABSTRACT redesign post-richi-streaming. I'm leaning > towards the latter. Yeah, I think we can delay this until I get the LTO bits working and merged (well, I mostly have to sit down and re-do the tooling :/) Richard. > Thoughts? >
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 7502fbc..4f3b484 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -18006,6 +18006,7 @@ gen_formal_parameter_die (tree node, tree origin, bool emit_name_p, } else { + gcc_unreachable(); /* Reuse DIE even with a differing context. This happens when called through