public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/9567] Using struct fields produces worse code than stand-alone vars.
       [not found] <20030204121601.9567.osv@javad.ru>
@ 2003-05-26  0:27 ` pinskia@physics.uc.edu
  2003-05-26  7:15 ` falk@debian.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: pinskia@physics.uc.edu @ 2003-05-26  0:27 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia@physics.uc.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-05-26 00:17:57
               date|                            |


------- Additional Comments From pinskia@physics.uc.edu  2003-05-26 00:17 -------
still happens on the mainline (20030525):
__Z2f1v:
        li r2,10
        li r11,0
        mtctr r2
        li r12,0
L8:
        addi r11,r11,1
        addi r12,r12,1
        lbz r2,0(r11)
        stb r2,0(r12)
        bdnz L8
        blr
        .align 2
        .globl __Z2f2v
__Z2f2v:
        li r3,10
        mtctr r3
L19:
        lbzu r3,1(r2)
        stbu r3,1(r9)
        bdnz L19
        blr
.data



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug optimization/9567] Using struct fields produces worse code than stand-alone vars.
       [not found] <20030204121601.9567.osv@javad.ru>
  2003-05-26  0:27 ` [Bug optimization/9567] Using struct fields produces worse code than stand-alone vars pinskia@physics.uc.edu
@ 2003-05-26  7:15 ` falk@debian.org
  2003-06-20 21:41 ` dhazeghi at yahoo dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: falk@debian.org @ 2003-05-26  7:15 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


falk@debian.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING


------- Additional Comments From falk@debian.org  2003-05-26 06:58 -------
Please provide a test case that doesn't have undefined behaviour. gcc
has to do alias analysis to determine whether dest might point to src.
It can't do that properly if you use uninitialized variables.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug optimization/9567] Using struct fields produces worse code than stand-alone vars.
       [not found] <20030204121601.9567.osv@javad.ru>
  2003-05-26  0:27 ` [Bug optimization/9567] Using struct fields produces worse code than stand-alone vars pinskia@physics.uc.edu
  2003-05-26  7:15 ` falk@debian.org
@ 2003-06-20 21:41 ` dhazeghi at yahoo dot com
  2003-07-27 20:56 ` pinskia at physics dot uc dot edu
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-06-20 21:41 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


dhazeghi at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet|                            |i686-pc-linux-gnu
   GCC host triplet|                            |i686-pc-linux-gnu
 GCC target triplet|                            |powerpc-rtems


------- Additional Comments From dhazeghi at yahoo dot com  2003-06-20 21:41 -------
Just a reminder that this bug is awaiting feedback. Can you provide the type of testcase Falk 
requested? Thanks,

Dara


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

* [Bug optimization/9567] Using struct fields produces worse code than stand-alone vars.
       [not found] <20030204121601.9567.osv@javad.ru>
                   ` (2 preceding siblings ...)
  2003-06-20 21:41 ` dhazeghi at yahoo dot com
@ 2003-07-27 20:56 ` pinskia at physics dot uc dot edu
  2003-11-10  8:14 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-27 20:56 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
   Last reconfirmed|2003-05-26 00:17:57         |2003-07-27 20:56:25
               date|                            |


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-27 20:56 -------
I can provide one:
struct A {
  char const* src;
  char* dest;
};

void f1(char const** src, char** dest) {
  A a;
  a.src= *src;
  a.dest= *dest;
  for(int i = 0; i < 10; ++i)
    *++a.dest = *++a.src;
  *src = a.src;
  *dest= a.dest;
}

void f2(char const** src1, char** dest1) {
  char const* src = *src1;
  char* dest = *dest1;
  for(int i = 0; i < 10; ++i)
    *++dest = *++src;
  *src1 = src;
  *dest1 = dest;
}


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

* [Bug optimization/9567] Using struct fields produces worse code than stand-alone vars.
       [not found] <20030204121601.9567.osv@javad.ru>
                   ` (3 preceding siblings ...)
  2003-07-27 20:56 ` pinskia at physics dot uc dot edu
@ 2003-11-10  8:14 ` pinskia at gcc dot gnu dot org
  2003-11-15  8:25 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-10  8:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-11-10 08:14 -------
This is another case where GCC likes to put objects on the stack too soon.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2003-07-27 20:56:25         |2003-11-10 08:14:22
               date|                            |
   Target Milestone|---                         |tree-ssa


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


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

* [Bug optimization/9567] Using struct fields produces worse code than stand-alone vars.
       [not found] <20030204121601.9567.osv@javad.ru>
                   ` (4 preceding siblings ...)
  2003-11-10  8:14 ` pinskia at gcc dot gnu dot org
@ 2003-11-15  8:25 ` pinskia at gcc dot gnu dot org
  2003-12-01  4:18 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-15  8:25 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


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


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

* [Bug optimization/9567] Using struct fields produces worse code than stand-alone vars.
       [not found] <20030204121601.9567.osv@javad.ru>
                   ` (5 preceding siblings ...)
  2003-11-15  8:25 ` pinskia at gcc dot gnu dot org
@ 2003-12-01  4:18 ` pinskia at gcc dot gnu dot org
  2004-03-03  6:09 ` pinskia at gcc dot gnu dot org
  2004-05-13 15:14 ` [Bug optimization (tree-ssa)/9567] " pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-01  4:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-12-01 04:18 -------
It is even worse now on the tree-ssa (extra mr's which is really caused by the register allocator).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2003-11-10 08:14:22         |2003-12-01 04:18:55
               date|                            |


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


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

* [Bug optimization/9567] Using struct fields produces worse code than stand-alone vars.
       [not found] <20030204121601.9567.osv@javad.ru>
                   ` (6 preceding siblings ...)
  2003-12-01  4:18 ` pinskia at gcc dot gnu dot org
@ 2004-03-03  6:09 ` pinskia at gcc dot gnu dot org
  2004-05-13 15:14 ` [Bug optimization (tree-ssa)/9567] " pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-03  6:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-03 06:09 -------
Suspending as this is now fixed on the tree-ssa.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |SUSPENDED


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


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

* [Bug optimization (tree-ssa)/9567] Using struct fields produces worse code than stand-alone vars.
       [not found] <20030204121601.9567.osv@javad.ru>
                   ` (7 preceding siblings ...)
  2004-03-03  6:09 ` pinskia at gcc dot gnu dot org
@ 2004-05-13 15:14 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-13 15:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-13 11:11 -------
Fixed by the merge of the tree-ssa into the mainline.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|SUSPENDED                   |RESOLVED
          Component|optimization (RTL)          |optimization (tree-ssa)
         Resolution|                            |FIXED
   Target Milestone|tree-ssa                    |3.5.0


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


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

end of thread, other threads:[~2004-05-13 11:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20030204121601.9567.osv@javad.ru>
2003-05-26  0:27 ` [Bug optimization/9567] Using struct fields produces worse code than stand-alone vars pinskia@physics.uc.edu
2003-05-26  7:15 ` falk@debian.org
2003-06-20 21:41 ` dhazeghi at yahoo dot com
2003-07-27 20:56 ` pinskia at physics dot uc dot edu
2003-11-10  8:14 ` pinskia at gcc dot gnu dot org
2003-11-15  8:25 ` pinskia at gcc dot gnu dot org
2003-12-01  4:18 ` pinskia at gcc dot gnu dot org
2004-03-03  6:09 ` pinskia at gcc dot gnu dot org
2004-05-13 15:14 ` [Bug optimization (tree-ssa)/9567] " 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).