public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/42632]  New:  unimplemented: inlining failed in call to ‘pskb_trim’: recursive inlining
@ 2010-01-06  6:07 raj dot khem at gmail dot com
  2010-01-06  6:08 ` [Bug regression/42632] " raj dot khem at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: raj dot khem at gmail dot com @ 2010-01-06  6:07 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 656 bytes --]

Attached testcase fails with gcc trunk when compiled with -O2 it works ok with
-O1. This works fine with gcc 4.4/-O2


-- 
           Summary:  unimplemented: inlining failed in call to ‘pskb_trim’:
                    recursive inlining
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: regression
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: raj dot khem at gmail dot com
 GCC build triplet: i686-linux
  GCC host triplet: i686-linux
GCC target triplet: i686-oe-linux


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


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

* [Bug regression/42632]  unimplemented: inlining failed in call to ‘pskb_trim’: recursive inlining
  2010-01-06  6:07 [Bug regression/42632] New: unimplemented: inlining failed in call to ‘pskb_trim’: recursive inlining raj dot khem at gmail dot com
@ 2010-01-06  6:08 ` raj dot khem at gmail dot com
  2010-01-06 11:40 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: raj dot khem at gmail dot com @ 2010-01-06  6:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from raj dot khem at gmail dot com  2010-01-06 06:08 -------
Created an attachment (id=19482)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19482&action=view)
testcase


-- 


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


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

* [Bug regression/42632] unimplemented: inlining failed in call to ‘pskb_trim’: recursive inlining
  2010-01-06  6:07 [Bug regression/42632] New: unimplemented: inlining failed in call to ‘pskb_trim’: recursive inlining raj dot khem at gmail dot com
  2010-01-06  6:08 ` [Bug regression/42632] " raj dot khem at gmail dot com
@ 2010-01-06 11:40 ` rguenth at gcc dot gnu dot org
  2010-01-06 12:26 ` [Bug tree-optimization/42632] [4.5 Regression] " rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-06 11:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2010-01-06 11:40 -------
Reducing.


-- 


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


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

* [Bug tree-optimization/42632] [4.5 Regression] unimplemented: inlining failed in call to ‘pskb_trim’: recursive inlining
  2010-01-06  6:07 [Bug regression/42632] New: unimplemented: inlining failed in call to ‘pskb_trim’: recursive inlining raj dot khem at gmail dot com
  2010-01-06  6:08 ` [Bug regression/42632] " raj dot khem at gmail dot com
  2010-01-06 11:40 ` rguenth at gcc dot gnu dot org
@ 2010-01-06 12:26 ` rguenth at gcc dot gnu dot org
  2010-01-06 12:44 ` rguenth at gcc dot gnu dot org
  2010-01-06 13:33 ` rguenth at gcc dot gnu dot org
  4 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-06 12:26 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2640 bytes --]



------- Comment #3 from rguenth at gcc dot gnu dot org  2010-01-06 12:26 -------
Hm, I reduced it to something that is not a regression anymore.  The original
testcase though works with 4.4 but fails with 4.5.  I guess the real problem
is latent.

static inline __attribute__((always_inline)) int
__pskb_trim(void)
{
  return ___pskb_trim();
}
static inline __attribute__((always_inline)) 
int pskb_trim(void)
{
  return __pskb_trim();
}
int ___pskb_trim(void)
{
  pskb_trim();
  return 0;
}

Is rejected at -O2 but accepted at -O1.  The issue is that we do not
compute always-inline inlines at once in one place but during early
inlining do

;; Function ___pskb_trim (___pskb_trim)
Considering to always inline inline candidate pskb_trim.
Not inlining: SSA form does not match.

;; Function __pskb_trim (__pskb_trim)
Considering inline candidate ___pskb_trim.
 Inlining ___pskb_trim into __pskb_trim.

;; Function pskb_trim (pskb_trim)
Considering to always inline inline candidate __pskb_trim.
 Inlining __pskb_trim into pskb_trim.
 Considering to always inline inline candidate pskb_trim.
 Not inlining: recursive call.
Inlining __pskb_trim to pskb_trim with frequency 1000

and with that particular oder of inlining (note especially how we
inline a non-always-inline function into an always-inline function!)
we end up with

pskb_trim ()
{
  int D.1969;
  int D.1969;
  int D.1961;

<bb 2>:
  pskb_trim ();
  D.1969_5 = 0;
  D.1961_1 = D.1969_5;
  return D.1961_1;

}

which the IPA inliner complains about.  At -O1 we do not perform the
bogus inlining during early inlining.

Now the cgraph has a very simple inlining solution:

int ___pskb_trim(void)
{
  ___pskb_trim();
  return 0;
}

and we better produce that.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|regression                  |tree-optimization
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-01-06 12:26:10
               date|                            |
            Summary|unimplemented: inlining     |[4.5 Regression]
                   |failed in call to           |unimplemented: inlining
                   |‘pskb_trim’: recursive      |failed in call to
                   |inlining                    |‘pskb_trim’: recursive
                   |                            |inlining
   Target Milestone|---                         |4.5.0


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


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

* [Bug tree-optimization/42632] [4.5 Regression] unimplemented: inlining failed in call to ‘pskb_trim’: recursive inlining
  2010-01-06  6:07 [Bug regression/42632] New: unimplemented: inlining failed in call to ‘pskb_trim’: recursive inlining raj dot khem at gmail dot com
                   ` (2 preceding siblings ...)
  2010-01-06 12:26 ` [Bug tree-optimization/42632] [4.5 Regression] " rguenth at gcc dot gnu dot org
@ 2010-01-06 12:44 ` rguenth at gcc dot gnu dot org
  2010-01-06 13:33 ` rguenth at gcc dot gnu dot org
  4 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-06 12:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2010-01-06 12:43 -------
I have a patch.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2010-01-06 12:26:10         |2010-01-06 12:43:52
               date|                            |


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


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

* [Bug tree-optimization/42632] [4.5 Regression] unimplemented: inlining failed in call to ‘pskb_trim’: recursive inlining
  2010-01-06  6:07 [Bug regression/42632] New: unimplemented: inlining failed in call to ‘pskb_trim’: recursive inlining raj dot khem at gmail dot com
                   ` (3 preceding siblings ...)
  2010-01-06 12:44 ` rguenth at gcc dot gnu dot org
@ 2010-01-06 13:33 ` rguenth at gcc dot gnu dot org
  4 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-06 13:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2010-01-06 13:32 -------
Actually this bug was fixed by

2010-01-05  Martin Jambor  <mjambor@suse.cz>

        PR tree-optimization/42462
        * ipa-inline.c (compute_inline_parameters): Pass node->decl instead of
        current_function_decl to helper functions and macros.

I still have a fix for the reduced testcase.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug tree-optimization/42632] [4.5 Regression] unimplemented: inlining failed in call to ‘pskb_trim’: recursive inlining
       [not found] <bug-42632-4@http.gcc.gnu.org/bugzilla/>
  2013-12-13 16:35 ` [Bug tree-optimization/42632] [4.5 Regression] unimplemented: inlining failed in call to ‘pskb_trim’: " law at redhat dot com
  2013-12-16  9:55 ` ktkachov at gcc dot gnu.org
@ 2013-12-16 11:43 ` ktkachov at gcc dot gnu.org
  2 siblings, 0 replies; 9+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2013-12-16 11:43 UTC (permalink / raw)
  To: gcc-bugs

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

Bug 42632 depends on bug 45685, which changed state.

Bug 45685 Summary: [4.7/4.8/4.9 Regression] missed conditional move opportunity in loop
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45685

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED


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

* [Bug tree-optimization/42632] [4.5 Regression] unimplemented: inlining failed in call to ‘pskb_trim’: recursive inlining
       [not found] <bug-42632-4@http.gcc.gnu.org/bugzilla/>
  2013-12-13 16:35 ` [Bug tree-optimization/42632] [4.5 Regression] unimplemented: inlining failed in call to ‘pskb_trim’: " law at redhat dot com
@ 2013-12-16  9:55 ` ktkachov at gcc dot gnu.org
  2013-12-16 11:43 ` ktkachov at gcc dot gnu.org
  2 siblings, 0 replies; 9+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2013-12-16  9:55 UTC (permalink / raw)
  To: gcc-bugs

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

Bug 42632 depends on bug 45685, which changed state.

Bug 45685 Summary: [4.7/4.8/4.9 Regression] missed conditional move opportunity in loop
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45685

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---


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

* [Bug tree-optimization/42632] [4.5 Regression] unimplemented: inlining failed in call to ‘pskb_trim’: recursive inlining
       [not found] <bug-42632-4@http.gcc.gnu.org/bugzilla/>
@ 2013-12-13 16:35 ` law at redhat dot com
  2013-12-16  9:55 ` ktkachov at gcc dot gnu.org
  2013-12-16 11:43 ` ktkachov at gcc dot gnu.org
  2 siblings, 0 replies; 9+ messages in thread
From: law at redhat dot com @ 2013-12-13 16:35 UTC (permalink / raw)
  To: gcc-bugs

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

Bug 42632 depends on bug 45685, which changed state.

Bug 45685 Summary: [4.7/4.8/4.9 Regression] missed conditional move opportunity in loop
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45685

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED


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

end of thread, other threads:[~2013-12-16 11:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-06  6:07 [Bug regression/42632] New: unimplemented: inlining failed in call to ‘pskb_trim’: recursive inlining raj dot khem at gmail dot com
2010-01-06  6:08 ` [Bug regression/42632] " raj dot khem at gmail dot com
2010-01-06 11:40 ` rguenth at gcc dot gnu dot org
2010-01-06 12:26 ` [Bug tree-optimization/42632] [4.5 Regression] " rguenth at gcc dot gnu dot org
2010-01-06 12:44 ` rguenth at gcc dot gnu dot org
2010-01-06 13:33 ` rguenth at gcc dot gnu dot org
     [not found] <bug-42632-4@http.gcc.gnu.org/bugzilla/>
2013-12-13 16:35 ` [Bug tree-optimization/42632] [4.5 Regression] unimplemented: inlining failed in call to ‘pskb_trim’: " law at redhat dot com
2013-12-16  9:55 ` ktkachov at gcc dot gnu.org
2013-12-16 11:43 ` ktkachov 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).