public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/47799] New: LTO debug info for early inlined functions missing
@ 2011-02-18 14:29 rguenth at gcc dot gnu.org
  2011-03-01 10:45 ` [Bug lto/47799] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-02-18 14:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47799

           Summary: LTO debug info for early inlined functions missing
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: lto
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rguenth@gcc.gnu.org


FAIL: gcc.dg/guality/pr43329-1.c  -O2 -flto  line 12 argx == 25

is because we inline foo during early inlining and the BLOCKs of the
inline instance are not emitted.  With -fno-early-inlining it succeeds.
That is, the effect of

  /* Output the inlining info for this abstract function, since it has been
     inlined.  If we don't do this now, we can lose the information about the
     variables in the function when the blocks get blown away as soon as we
     remove the cgraph node.  */
  (*debug_hooks->outlining_inline_function) (cg_edge->callee->decl);

isn't reflected in the LTO IL and thus gets lost.

The information should still be there in the inlined BLOCKs abstract
origins though, no?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug lto/47799] LTO debug info for early inlined functions missing
  2011-02-18 14:29 [Bug lto/47799] New: LTO debug info for early inlined functions missing rguenth at gcc dot gnu.org
@ 2011-03-01 10:45 ` rguenth at gcc dot gnu.org
  2011-03-03 11:24 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-01 10:45 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47799

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.03.01 10:45:01
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-01 10:45:01 UTC ---
The situation has been intentionally made worse with

2011-03-01  Richard Guenther  <rguenther@suse.de>

        PR lto/46911
        * lto-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
        Do not stream DECL_ABSTRACT_ORIGIN.
        (lto_input_ts_block_tree_pointers): Nor BLOCK_SOURCE_LOCATION,
        BLOCK_NONLOCALIZED_VARS or BLOCK_ABSTRACT_ORIGIN.
        * lto-streamer-out.c (lto_output_ts_decl_common_tree_pointers):
        Do not stream DECL_ABSTRACT_ORIGIN.
        (lto_output_ts_block_tree_pointers): Nor BLOCK_SOURCE_LOCATION,
        BLOCK_NONLOCALIZED_VARS or BLOCK_ABSTRACT_ORIGIN.


a proper solution will involve streaming of the effect of that debug hook
(via early debug info).

The guality test passes now as the variable appears as if it was a local one
(but breaking on the inlined foo is no longer possible).


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug lto/47799] LTO debug info for early inlined functions missing
  2011-02-18 14:29 [Bug lto/47799] New: LTO debug info for early inlined functions missing rguenth at gcc dot gnu.org
  2011-03-01 10:45 ` [Bug lto/47799] " rguenth at gcc dot gnu.org
@ 2011-03-03 11:24 ` rguenth at gcc dot gnu.org
  2012-09-28 11:07 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-03 11:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47799

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl.tools at gmail dot com

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-03 11:24:36 UTC ---
*** Bug 47941 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug lto/47799] LTO debug info for early inlined functions missing
  2011-02-18 14:29 [Bug lto/47799] New: LTO debug info for early inlined functions missing rguenth at gcc dot gnu.org
  2011-03-01 10:45 ` [Bug lto/47799] " rguenth at gcc dot gnu.org
  2011-03-03 11:24 ` rguenth at gcc dot gnu.org
@ 2012-09-28 11:07 ` rguenth at gcc dot gnu.org
  2012-09-28 13:09 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-09-28 11:07 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47799

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-28 11:07:22 UTC ---
Author: rguenth
Date: Fri Sep 28 11:07:17 2012
New Revision: 191824

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191824
Log:
2012-09-28  Richard Guenther  <rguenther@suse.de>

    PR lto/47799
    * lto-streamer-out.c (tree_is_indexable): Make PARM_DECLs global.
    (lto_output_tree_ref): Handle references to them.
    (output_function): Do not output function arguments again.
    * lto-streamer-in.c (input_function): Do not input arguments
    again, nor overwrite them.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/lto-streamer-in.c
    trunk/gcc/lto-streamer-out.c


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug lto/47799] LTO debug info for early inlined functions missing
  2011-02-18 14:29 [Bug lto/47799] New: LTO debug info for early inlined functions missing rguenth at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-09-28 11:07 ` rguenth at gcc dot gnu.org
@ 2012-09-28 13:09 ` rguenth at gcc dot gnu.org
  2012-10-01 10:58 ` rguenth at gcc dot gnu.org
  2012-10-04 11:25 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-09-28 13:09 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47799

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-28 13:08:42 UTC ---
Mine.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug lto/47799] LTO debug info for early inlined functions missing
  2011-02-18 14:29 [Bug lto/47799] New: LTO debug info for early inlined functions missing rguenth at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-09-28 13:09 ` rguenth at gcc dot gnu.org
@ 2012-10-01 10:58 ` rguenth at gcc dot gnu.org
  2012-10-04 11:25 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-01 10:58 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47799

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-01 10:58:06 UTC ---
If we arrange for "minimal" support, thus output BLOCK_ABSTRACT_ORIGIN/LOCATION
only if it is a FUNCTION_DECL (thus, try to handle 1-level inlining only) then
we run into the issue that if the function isn't materialized in the same
LTRANS unit then it's DECL_INITIAL is NULL_TREE and thus dwarf2out_decl
doesn't do anything and we end up with

 <2><166>: Abbrev Number: 5 (DW_TAG_inlined_subroutine)
    <16b>   DW_AT_low_pc      : 0x40058c        
    <173>   DW_AT_high_pc     : 0xa     
    <17b>   DW_AT_call_file   : 1       
    <17c>   DW_AT_call_line   : 6       

We can of course "fix" dwarf2out.c to not look at DECL_INITIAL (which it
does as a "fix" for the C frontends extern inline functions ...) but
at for example DECL_ABSTRACT (when we are called from inline generation
and nothing output the abstract function DIE already).  Then we finally
get the desired

 <2><166>: Abbrev Number: 5 (DW_TAG_inlined_subroutine)
    <167>   DW_AT_abstract_origin: <0x190>      
    <16b>   DW_AT_low_pc      : 0x40058c        
    <173>   DW_AT_high_pc     : 0xa     
    <17b>   DW_AT_call_file   : 1       
    <17c>   DW_AT_call_line   : 6       

with a proper abstract origin and we can break on the inlined function.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug lto/47799] LTO debug info for early inlined functions missing
  2011-02-18 14:29 [Bug lto/47799] New: LTO debug info for early inlined functions missing rguenth at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-10-01 10:58 ` rguenth at gcc dot gnu.org
@ 2012-10-04 11:25 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-04 11:25 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47799

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.8.0

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-04 11:24:41 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-10-04 11:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-18 14:29 [Bug lto/47799] New: LTO debug info for early inlined functions missing rguenth at gcc dot gnu.org
2011-03-01 10:45 ` [Bug lto/47799] " rguenth at gcc dot gnu.org
2011-03-03 11:24 ` rguenth at gcc dot gnu.org
2012-09-28 11:07 ` rguenth at gcc dot gnu.org
2012-09-28 13:09 ` rguenth at gcc dot gnu.org
2012-10-01 10:58 ` rguenth at gcc dot gnu.org
2012-10-04 11:25 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).