public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/17217] New: not removing removal of nested structs
@ 2004-08-27 18:56 pinskia at gcc dot gnu dot org
  2004-08-27 19:42 ` [Bug tree-optimization/17217] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-27 18:56 UTC (permalink / raw)
  To: gcc-bugs

gcc -O3 and you will see that the load and store to the struct is still there for j.
int h(int *a);
int f(int i, int j)
{
  int t = i;
  int t1 = j;
  int g()
  {
     return h(&t) + t1;
  }
  return g() + t1;
}

I found this when looking at facerec which uses nested functions.

-- 
           Summary: not removing removal of nested structs
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug tree-optimization/17217] not removing removal of nested structs
  2004-08-27 18:56 [Bug tree-optimization/17217] New: not removing removal of nested structs pinskia at gcc dot gnu dot org
@ 2004-08-27 19:42 ` pinskia at gcc dot gnu dot org
  2004-08-27 22:13 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-27 19:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-27 19:42 -------
Here is the unnested version:
int h(int *a);
struct G
{
int t;
int t1;
};
int g1(struct G*);
int f1(int i, int j)
{
  struct G nestedf1={i,j};
  return g1(&nestedf1)+nestedf1.t1;
}
static int g1(struct G *nestedf1)
{
  return h(&nestedf1->t)+ nestedf1->t1;
}

-- 


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


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

* [Bug tree-optimization/17217] not removing removal of nested structs
  2004-08-27 18:56 [Bug tree-optimization/17217] New: not removing removal of nested structs pinskia at gcc dot gnu dot org
  2004-08-27 19:42 ` [Bug tree-optimization/17217] " pinskia at gcc dot gnu dot org
@ 2004-08-27 22:13 ` pinskia at gcc dot gnu dot org
  2004-08-31  5:26 ` pinskia at gcc dot gnu dot org
  2005-04-16 17:37 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-27 22:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-27 22:13 -------
Daniel is this related to the aliasing stuff you are working on, I assume, if you get some time could you 
look to see if what you do actually fixes this?

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


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


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

* [Bug tree-optimization/17217] not removing removal of nested structs
  2004-08-27 18:56 [Bug tree-optimization/17217] New: not removing removal of nested structs pinskia at gcc dot gnu dot org
  2004-08-27 19:42 ` [Bug tree-optimization/17217] " pinskia at gcc dot gnu dot org
  2004-08-27 22:13 ` pinskia at gcc dot gnu dot org
@ 2004-08-31  5:26 ` pinskia at gcc dot gnu dot org
  2005-04-16 17:37 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-31  5:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-31 05:26 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-31 05:26:12
               date|                            |


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


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

* [Bug tree-optimization/17217] not removing removal of nested structs
  2004-08-27 18:56 [Bug tree-optimization/17217] New: not removing removal of nested structs pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-08-31  5:26 ` pinskia at gcc dot gnu dot org
@ 2005-04-16 17:37 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-16 17:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-16 17:37 -------
Fixed in 4.1.0 and above by Daniel's aliasing improvements.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.1.0


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


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

end of thread, other threads:[~2005-04-16 17:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-27 18:56 [Bug tree-optimization/17217] New: not removing removal of nested structs pinskia at gcc dot gnu dot org
2004-08-27 19:42 ` [Bug tree-optimization/17217] " pinskia at gcc dot gnu dot org
2004-08-27 22:13 ` pinskia at gcc dot gnu dot org
2004-08-31  5:26 ` pinskia at gcc dot gnu dot org
2005-04-16 17:37 ` pinskia 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).