public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/13599] New: [tree-ssa] Inefficient ordering low GIMPLE lowering
@ 2004-01-07 15:14 steven at gcc dot gnu dot org
  2004-01-07 18:32 ` [Bug optimization/13599] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-01-07 15:14 UTC (permalink / raw)
  To: gcc-bugs

Removing useless statements and lowering interact rather poorly with 
GIMPLE lowering.  We sometimes produce extra labels, and remove  
statements that we reintroduce during lowering.  For example, consider 
this code: 
 
void 
foo (void) 
{ 
  int i, a; 
  for (i = 0; i < 10; i++) 
    { a = i; } 
} 
 
 
t.c.t06.gimple 
------------------------------------- 
;; Function foo (foo) 
 
foo () 
{ 
  int i; 
  int a; 
 
  i = 0; 
  goto <D1056>; 
  <D1054>:; 
  { 
    a = 10; 
  } 
  i = i + 1; 
  <D1056>:; 
  if (i <= 9) 
    { 
      goto <D1054>; 
    } 
  else 
    { 
      goto <D1053>; 
    } 
  <D1053>:; 
} 
------------------------------------- 
 
t.c.t07.useless 
------------------------------------- 
;; Function foo (foo) 
 
foo () 
{ 
  int i; 
  int a; 
 
  i = 0; 
  goto <D1056>; 
  <D1054>:; 
  a = 10; 
  i = i + 1; 
  <D1056>:; 
  if (i <= 9) 
    { 
      goto <D1054>; 
    } 
  else 
    { 
 
    } 
  <D1053>:; 
} 
------------------------------------- 
 
t.c.t09.lower 
------------------------------------- 
;; Function foo (foo) 
 
foo () 
{ 
  int a; 
  int i; 
 
  i = 0; 
  goto <D1056>; 
  <D1054>:; 
  a = 10; 
  i = i + 1; 
  <D1056>:; 
  if (i <= 9) goto <D1054>; else goto <D1062>; 
  <D1062>:; 
  <D1053>:; 
} 
------------------------------------- 
 
Notice we first remove a GOTO during "useless" and then resurrect a new 
one while lowering.  Also, there's an extra label, which gives is an extra 
basic block when building the flow graph.

-- 
           Summary: [tree-ssa] Inefficient ordering low GIMPLE lowering
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: steven at gcc dot gnu dot org
                CC: dnovillo at redhat dot com,gcc-bugs at gcc dot gnu dot
                    org


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


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

* [Bug optimization/13599] [tree-ssa] Inefficient ordering low GIMPLE lowering
  2004-01-07 15:14 [Bug optimization/13599] New: [tree-ssa] Inefficient ordering low GIMPLE lowering steven at gcc dot gnu dot org
@ 2004-01-07 18:32 ` pinskia at gcc dot gnu dot org
  2004-01-09 22:55 ` cvs-commit at gcc dot gnu dot org
  2004-01-09 22:56 ` steven at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-07 18:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-07 18:32 -------
Both a memory problem and a compile time one.
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |compile-time-hog, memory-hog
   Last reconfirmed|0000-00-00 00:00:00         |2004-01-07 18:32:25
               date|                            |
   Target Milestone|---                         |tree-ssa


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


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

* [Bug optimization/13599] [tree-ssa] Inefficient ordering low GIMPLE lowering
  2004-01-07 15:14 [Bug optimization/13599] New: [tree-ssa] Inefficient ordering low GIMPLE lowering steven at gcc dot gnu dot org
  2004-01-07 18:32 ` [Bug optimization/13599] " pinskia at gcc dot gnu dot org
@ 2004-01-09 22:55 ` cvs-commit at gcc dot gnu dot org
  2004-01-09 22:56 ` steven at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-09 22:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-01-09 22:55 -------
Subject: Bug 13599

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	tree-ssa-20020619-branch
Changes by:	steven@gcc.gnu.org	2004-01-09 22:55:45

Modified files:
	gcc            : ChangeLog.tree-ssa tree-cfg.c 
	gcc/testsuite  : ChangeLog.tree-ssa 
Added files:
	gcc/testsuite/gcc.dg/tree-ssa: useless-1.c 

Log message:
	PR optimization/13599
	* tree-cfg.c (remove_useless_stmts_cond): Clear last-goto
	before returning.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.tree-ssa.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.1066&r2=1.1.2.1067
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-cfg.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.4.247&r2=1.1.4.248
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.tree-ssa.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.140&r2=1.1.2.141
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/useless-1.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug optimization/13599] [tree-ssa] Inefficient ordering low GIMPLE lowering
  2004-01-07 15:14 [Bug optimization/13599] New: [tree-ssa] Inefficient ordering low GIMPLE lowering steven at gcc dot gnu dot org
  2004-01-07 18:32 ` [Bug optimization/13599] " pinskia at gcc dot gnu dot org
  2004-01-09 22:55 ` cvs-commit at gcc dot gnu dot org
@ 2004-01-09 22:56 ` steven at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-01-09 22:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-01-09 22:56 -------
Adios bug. 
http://gcc.gnu.org/ml/gcc-patches/2004-01/msg00699.html 

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


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


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

end of thread, other threads:[~2004-01-09 22:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-07 15:14 [Bug optimization/13599] New: [tree-ssa] Inefficient ordering low GIMPLE lowering steven at gcc dot gnu dot org
2004-01-07 18:32 ` [Bug optimization/13599] " pinskia at gcc dot gnu dot org
2004-01-09 22:55 ` cvs-commit at gcc dot gnu dot org
2004-01-09 22:56 ` steven 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).