public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "steven at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/42494] [4.4 Regression] Missed dead-code-elimination
Date: Thu, 07 Jan 2010 21:30:00 -0000	[thread overview]
Message-ID: <20100107212959.24447.qmail@sourceware.org> (raw)
In-Reply-To: <bug-42494-17572@http.gcc.gnu.org/bugzilla/>



------- Comment #8 from steven at gcc dot gnu dot org  2010-01-07 21:29 -------
The diff between -O2 and -Os starts in combine:

diff -ur O2/t.c.175r.combine Os/t.c.175r.combine
--- O2/t.c.175r.combine 2010-01-07 22:24:04.000000000 +0100
+++ Os/t.c.175r.combine 2010-01-07 22:23:14.000000000 +0100
@@ -4,18 +4,20 @@
 starting the processing of deferred insns
 ending the processing of deferred insns
 df_analyze called
-insn_cost 7: 12
+insn_cost 7: 8
 insn_cost 8: 4
 insn_cost 9: 4
-insn_cost 10: 12
-insn_cost 11: 12
+insn_cost 10: 8
+insn_cost 11: 4
 insn_cost 12: 4
-insn_cost 46: 4
-insn_cost 17: 12
+insn_cost 46: 16
+insn_cost 17: 8
 insn_cost 19: 4
-rejecting combination of insns 12 and 46
-original costs 4 + 4 = 8
-replacement cost 12
+deferring deletion of insn with uid = 12.
+modifying insn i3    46 {r133:SI={(r138:SI!=0x0)?0x2:0x0};clobber cc:CC;}
+      REG_UNUSED: cc:CC
+      REG_DEAD: r138:SI
+deferring rescan insn with uid = 46.
 (note# 0 # 2 [bb 2] NOTE_INSN_BASIC_BLOCK)

 (note# # # 2 NOTE_INSN_FUNCTION_BEG)
@@ -40,16 +42,17 @@
         (expr_list:REG_EQUAL (mem/c/i:SI (symbol_ref:SI ("bool_var") [flags
0xc0]  <var_decl # bool_var>) [2 bool_var+0 S4 A32])
             (nil))))

-(insn# # # 2 t.c:13 (set (reg:CC 24 cc)
-        (compare:CC (reg:SI 138 [ bool_var ])
-            (const_int 0 [0x0])))# {*arm_cmpsi_insn} (nil))
-
-(insn# # # 2 t.c:8 (set (reg/v:SI 133 [ flags ])
-        (if_then_else:SI (eq (reg:CC 24 cc)
-                (const_int 0 [0x0]))
-            (reg:SI 138 [ bool_var ])
-            (const_int 2 [0x2])))# {*movsicc_insn} (expr_list:REG_DEAD (reg:SI
138 [ bool_var ])
-        (expr_list:REG_DEAD (reg:CC 24 cc)
+(note# # # 2 NOTE_INSN_DELETED)
+
+(insn# # # 2 t.c:8 (parallel [
+            (set (reg/v:SI 133 [ flags ])
+                (if_then_else:SI (ne (reg:SI 138 [ bool_var ])
+                        (const_int 0 [0x0]))
+                    (const_int 2 [0x2])
+                    (const_int 0 [0x0])))
+            (clobber (reg:CC 24 cc))
+        ])# {movcond} (expr_list:REG_UNUSED (reg:CC 24 cc)
+        (expr_list:REG_DEAD (reg:SI 138 [ bool_var ])
             (nil))))

 (insn# # # 2 t.c:14 (set (reg/f:SI 139)
@@ -60,7 +63,10 @@
         (expr_list:REG_DEAD (reg/v:SI 133 [ flags ])
             (nil))))
 starting the processing of deferred insns
+deleting insn with uid = 12.
+rescanning insn with uid = 46.
+deleting insn with uid = 46.
 ending the processing of deferred insns

-;; Combiner totals: 12 attempts, 12 substitutions (2 requiring new space),
-;; 0 successes.
+;; Combiner totals: 13 attempts, 13 substitutions (2 requiring new space),
+;; 1 successes.


-- 


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


  parent reply	other threads:[~2010-01-07 21:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-25  5:42 [Bug c/42494] New: Regression on dead-code-elimination: GCC 4.2.1 generates better code than 4.4.0 sliao at google dot com
2009-12-29 10:35 ` [Bug c/42494] [4.4 only] " ramana at gcc dot gnu dot org
2009-12-29 11:31 ` [Bug c/42494] [4.4 Regression] Missed " steven at gcc dot gnu dot org
2009-12-29 12:45 ` [Bug tree-optimization/42494] " ramana at gcc dot gnu dot org
2009-12-30 23:21 ` [Bug tree-optimization/42494] [4.4 Regression] Missed dead-code-elimination rguenth at gcc dot gnu dot org
2009-12-30 23:34 ` rguenth at gcc dot gnu dot org
2009-12-31 15:36 ` rguenth at gcc dot gnu dot org
2010-01-07  9:19 ` sliao at google dot com
2010-01-07  9:49 ` steven at gcc dot gnu dot org
2010-01-07 21:30 ` steven at gcc dot gnu dot org [this message]
2010-01-07 21:36 ` steven at gcc dot gnu dot org
2010-01-07 22:08 ` steven at gcc dot gnu dot org
2010-01-07 22:08 ` steven at gcc dot gnu dot org
2010-01-21 13:19 ` jakub at gcc dot gnu dot org
2010-02-08 16:45 ` steven at gcc dot gnu dot org
2010-04-30  8:58 ` jakub at gcc dot gnu dot org
     [not found] <bug-42494-4@http.gcc.gnu.org/bugzilla/>
2010-10-01 11:59 ` jakub at gcc dot gnu.org
2011-04-16 11:02 ` jakub at gcc dot gnu.org
2011-04-16 11:29 ` jingyu at google dot com
2011-05-13 19:46 ` lacombar at gmail dot com
2011-05-13 20:19 ` jingyu at google dot com
2011-05-13 20:51 ` lacombar at gmail dot com
2011-05-18 11:21 ` rguenth at gcc dot gnu.org
2011-05-18 11:46 ` jingyu at google dot com
2011-05-18 15:29 ` lacombar at gmail dot com
2012-03-13 16:01 ` jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100107212959.24447.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).