public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/37352]  New: thunks for virtual function should work on lto
@ 2008-09-03 16:29 espindola at google dot com
  2008-11-19 17:49 ` [Bug c++/37352] " espindola at google dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: espindola at google dot com @ 2008-09-03 16:29 UTC (permalink / raw)
  To: gcc-bugs

>From http://gcc.gnu.org/ml/gcc-patches/2008-03/msg00349.html:

   Currently the thunks for a function are 
   emitted from the frontend, exactly when the function itself is emitted
   (as RTL).  The frontend does some analysis of thunks beforehand 
   already, but I simply deactivated emission of thunks for my experiment.
   This needs to be done before IPA, either by making thunks a middle-end
   concept, or implementing alternate entry points for real

Maybe it is possible to generate thunks eagerly as a first solution?


-- 
           Summary: thunks for virtual function should work on lto
           Product: gcc
           Version: lto
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: espindola at google dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


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

* [Bug c++/37352] thunks for virtual function should work on lto
  2008-09-03 16:29 [Bug c++/37352] New: thunks for virtual function should work on lto espindola at google dot com
@ 2008-11-19 17:49 ` espindola at google dot com
  2008-11-19 17:50 ` espindola at google dot com
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: espindola at google dot com @ 2008-11-19 17:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from espindola at google dot com  2008-11-19 17:47 -------
Created an attachment (id=16722)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16722&action=view)
testcase


-- 


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


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

* [Bug c++/37352] thunks for virtual function should work on lto
  2008-09-03 16:29 [Bug c++/37352] New: thunks for virtual function should work on lto espindola at google dot com
  2008-11-19 17:49 ` [Bug c++/37352] " espindola at google dot com
@ 2008-11-19 17:50 ` espindola at google dot com
  2008-11-19 17:54 ` espindola at google dot com
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: espindola at google dot com @ 2008-11-19 17:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from espindola at google dot com  2008-11-19 17:49 -------
To reproduce:
g++ -O2 -c thunk.C -flto-single -o thunk-lto.o
g++ -O2 -c thunk.C -o thunk.o

readelf -s thunk.o  | grep Th
    35: 0000000000000000     6 FUNC    WEAK   DEFAULT   19 _ZThn8_N1C1fEv
readelf -s thunk-lto.o  | grep Th
    26: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _ZThn8_N1C1fEv


-- 


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


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

* [Bug c++/37352] thunks for virtual function should work on lto
  2008-09-03 16:29 [Bug c++/37352] New: thunks for virtual function should work on lto espindola at google dot com
  2008-11-19 17:49 ` [Bug c++/37352] " espindola at google dot com
  2008-11-19 17:50 ` espindola at google dot com
@ 2008-11-19 17:54 ` espindola at google dot com
  2008-12-31 19:28 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: espindola at google dot com @ 2008-11-19 17:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from espindola at google dot com  2008-11-19 17:53 -------
This case can be easily fixed by setting targetm.asm_out.can_output_mi_thunk to
NULL. This will introduce a performance regression.

The only case that will be missing is varg functions.

The llvm equivalent bug is http://llvm.org/bugs/show_bug.cgi?id=2861.


-- 


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


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

* [Bug c++/37352] thunks for virtual function should work on lto
  2008-09-03 16:29 [Bug c++/37352] New: thunks for virtual function should work on lto espindola at google dot com
                   ` (2 preceding siblings ...)
  2008-11-19 17:54 ` espindola at google dot com
@ 2008-12-31 19:28 ` pinskia at gcc dot gnu dot org
  2008-12-31 19:34 ` dnovillo at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-31 19:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2008-12-31 19:26 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-12-31 19:26:06
               date|                            |


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


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

* [Bug c++/37352] thunks for virtual function should work on lto
  2008-09-03 16:29 [Bug c++/37352] New: thunks for virtual function should work on lto espindola at google dot com
                   ` (3 preceding siblings ...)
  2008-12-31 19:28 ` pinskia at gcc dot gnu dot org
@ 2008-12-31 19:34 ` dnovillo at gcc dot gnu dot org
  2009-10-06 13:53 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2008-12-31 19:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dnovillo at gcc dot gnu dot org  2008-12-31 19:32 -------

Initial fix at http://gcc.gnu.org/ml/gcc-patches/2008-12/msg00953.html
Keeping open as thunks with varargs are still broken.


-- 

dnovillo at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|maddox at google dot com    |
         AssignedTo|unassigned at gcc dot gnu   |dnovillo at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-12-31 19:26:06         |2008-12-31 19:32:54
               date|                            |


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


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

* [Bug c++/37352] thunks for virtual function should work on lto
  2008-09-03 16:29 [Bug c++/37352] New: thunks for virtual function should work on lto espindola at google dot com
                   ` (4 preceding siblings ...)
  2008-12-31 19:34 ` dnovillo at gcc dot gnu dot org
@ 2009-10-06 13:53 ` rguenth at gcc dot gnu dot org
  2009-10-06 13:54 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-06 13:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2009-10-06 13:53 -------
*** Bug 41602 has been marked as a duplicate of this bug. ***


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rubidium at openttd dot org


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


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

* [Bug c++/37352] thunks for virtual function should work on lto
  2008-09-03 16:29 [Bug c++/37352] New: thunks for virtual function should work on lto espindola at google dot com
                   ` (5 preceding siblings ...)
  2009-10-06 13:53 ` rguenth at gcc dot gnu dot org
@ 2009-10-06 13:54 ` rguenth at gcc dot gnu dot org
  2009-10-10 18:44 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-06 13:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2009-10-06 13:54 -------
Another testcase in PR41602.  SPEC CPU 2006 450.soplex is the only one in
SPEC 2000/2006 to run into this issue.


-- 


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


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

* [Bug c++/37352] thunks for virtual function should work on lto
  2008-09-03 16:29 [Bug c++/37352] New: thunks for virtual function should work on lto espindola at google dot com
                   ` (6 preceding siblings ...)
  2009-10-06 13:54 ` rguenth at gcc dot gnu dot org
@ 2009-10-10 18:44 ` rguenth at gcc dot gnu dot org
  2009-11-11 18:28 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-10 18:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rguenth at gcc dot gnu dot org  2009-10-10 18:44 -------
*** Bug 41663 has been marked as a duplicate of this bug. ***


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |danglin at gcc dot gnu dot
                   |                            |org


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


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

* [Bug c++/37352] thunks for virtual function should work on lto
  2008-09-03 16:29 [Bug c++/37352] New: thunks for virtual function should work on lto espindola at google dot com
                   ` (7 preceding siblings ...)
  2009-10-10 18:44 ` rguenth at gcc dot gnu dot org
@ 2009-11-11 18:28 ` pinskia at gcc dot gnu dot org
  2009-11-11 20:32 ` rguenth at gcc dot gnu dot org
  2009-11-30 12:37 ` rguenth at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-11-11 18:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pinskia at gcc dot gnu dot org  2009-11-11 18:28 -------
*** Bug 42009 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jamborm at gcc dot gnu dot
                   |                            |org


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


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

* [Bug c++/37352] thunks for virtual function should work on lto
  2008-09-03 16:29 [Bug c++/37352] New: thunks for virtual function should work on lto espindola at google dot com
                   ` (8 preceding siblings ...)
  2009-11-11 18:28 ` pinskia at gcc dot gnu dot org
@ 2009-11-11 20:32 ` rguenth at gcc dot gnu dot org
  2009-11-30 12:37 ` rguenth at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-11-11 20:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from rguenth at gcc dot gnu dot org  2009-11-11 20:32 -------
There's a simple workaround for most cases, condition asm-thunks on
!flag_write_lto.  We'll do this if a proper implementation doesn't come up
for 4.5.


-- 


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


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

* [Bug c++/37352] thunks for virtual function should work on lto
  2008-09-03 16:29 [Bug c++/37352] New: thunks for virtual function should work on lto espindola at google dot com
                   ` (9 preceding siblings ...)
  2009-11-11 20:32 ` rguenth at gcc dot gnu dot org
@ 2009-11-30 12:37 ` rguenth at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-11-30 12:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from rguenth at gcc dot gnu dot org  2009-11-30 12:36 -------
Fixed by Honza.


-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2009-11-30 12:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-03 16:29 [Bug c++/37352] New: thunks for virtual function should work on lto espindola at google dot com
2008-11-19 17:49 ` [Bug c++/37352] " espindola at google dot com
2008-11-19 17:50 ` espindola at google dot com
2008-11-19 17:54 ` espindola at google dot com
2008-12-31 19:28 ` pinskia at gcc dot gnu dot org
2008-12-31 19:34 ` dnovillo at gcc dot gnu dot org
2009-10-06 13:53 ` rguenth at gcc dot gnu dot org
2009-10-06 13:54 ` rguenth at gcc dot gnu dot org
2009-10-10 18:44 ` rguenth at gcc dot gnu dot org
2009-11-11 18:28 ` pinskia at gcc dot gnu dot org
2009-11-11 20:32 ` rguenth at gcc dot gnu dot org
2009-11-30 12:37 ` rguenth at gcc dot gnu dot 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).