public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/29922] [4.3 Regression] [Linux] ICE in insert_into_preds_of_block Date: Mon, 27 Nov 2006 08:06:00 -0000 [thread overview] Message-ID: <20061127080629.21026.qmail@sourceware.org> (raw) In-Reply-To: <bug-29922-12686@http.gcc.gnu.org/bugzilla/> ------- Comment #11 from pinskia at gcc dot gnu dot org 2006-11-27 08:06 ------- Here is the patch which fixes the PHI issue but I don't know if it will always fix the PRE issue but I think it will as the PRE issue is always with VOPs: Index: tree-ssa-dom.c =================================================================== --- tree-ssa-dom.c (revision 119245) +++ tree-ssa-dom.c (working copy) @@ -1700,8 +1700,10 @@ cprop_operand (tree stmt, use_operand_p depth than the propagatee. Otherwise, this may move loop variant variables outside of their loops and prevent coalescing opportunities. If the value was loop invariant, it will be hoisted - by LICM and exposed for copy propagation. */ - if (loop_depth_of_name (val) > loop_depth_of_name (op)) + by LICM and exposed for copy propagation. We don't care much about + virtual operands. */ + if (loop_depth_of_name (val) > loop_depth_of_name (op) + && is_gimple_reg (val)) return false; /* Dump details. */ @@ -2136,12 +2138,13 @@ static void propagate_rhs_into_lhs (tree stmt, tree lhs, tree rhs, bitmap interesting_names) { /* First verify that propagation is valid and isn't going to move a - loop variant variable outside its loop. */ + loop variant variable outside its loop except for vops. */ if (! SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs) && (TREE_CODE (rhs) != SSA_NAME || ! SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs)) && may_propagate_copy (lhs, rhs) - && loop_depth_of_name (lhs) >= loop_depth_of_name (rhs)) + && (loop_depth_of_name (lhs) > loop_depth_of_name (rhs) + || !is_gimple_reg (lhs))) { use_operand_p use_p; imm_use_iterator iter; Index: tree-ssa-copy.c =================================================================== --- tree-ssa-copy.c (revision 119245) +++ tree-ssa-copy.c (working copy) @@ -801,8 +801,10 @@ copy_prop_visit_phi_node (tree phi) Otherwise, this may move loop variant variables outside of their loops and prevent coalescing opportunities. If the value was loop invariant, it will be hoisted by LICM and - exposed for copy propagation. */ - if (loop_depth_of_name (arg) > loop_depth_of_name (lhs)) + exposed for copy propagation. We don't much about virtual + operands as they don't cause any LICM to happen. */ + if (loop_depth_of_name (arg) > loop_depth_of_name (lhs) + && is_gimple_reg (arg)) { phi_val.value = lhs; break; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29922
next prev parent reply other threads:[~2006-11-27 8:06 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-11-21 1:41 [Bug c/29922] New: gcc-4.3-20061118 failed to compile linux-2.6.19-rc6-git2 happyarch at gmail dot com 2006-11-21 2:00 ` [Bug tree-optimization/29922] " pinskia at gcc dot gnu dot org 2006-11-21 3:17 ` happyarch at gmail dot com 2006-11-21 3:22 ` pinskia at gcc dot gnu dot org 2006-11-21 3:33 ` happyarch at gmail dot com 2006-11-21 7:04 ` happyarch at gmail dot com 2006-11-21 7:10 ` pinskia at gcc dot gnu dot org 2006-11-21 7:48 ` pinskia at gcc dot gnu dot org 2006-11-21 7:50 ` pinskia at gcc dot gnu dot org 2006-11-25 9:13 ` [Bug tree-optimization/29922] [4.3 Regression] [Linux] ICE in insert_into_preds_of_block pinskia at gcc dot gnu dot org 2006-11-27 7:52 ` pinskia at gcc dot gnu dot org 2006-11-27 8:06 ` pinskia at gcc dot gnu dot org [this message] 2006-11-27 17:23 ` Andrew Pinski 2006-11-27 17:23 ` pinskia at gmail dot com 2006-12-15 22:09 ` pinskia at gcc dot gnu dot org 2006-12-18 9:33 ` pinskia at gcc dot gnu dot org 2006-12-19 21:56 ` kargl at gcc dot gnu dot org 2006-12-20 2:55 ` Daniel Berlin 2006-12-20 2:55 ` dberlin at dberlin dot org 2007-01-11 18:28 ` pinskia at gcc dot gnu dot org 2007-02-09 19:00 ` pinskia at gcc dot gnu dot org 2007-03-05 10:13 ` tbm at cyrius dot com 2007-03-09 17:55 ` dberlin at gcc dot gnu dot org 2007-03-09 19:28 ` tbm at cyrius dot com 2007-03-09 19:34 ` tbm at cyrius dot com 2007-03-10 8:48 ` Jean-pierre dot vial at wanadoo dot fr 2007-03-17 23:08 ` dberlin at gcc dot gnu dot org 2007-03-17 23:17 ` tbm at cyrius dot com 2007-03-17 23:19 ` dberlin at gcc dot gnu dot org 2007-04-28 4:19 ` kargl at gcc dot gnu dot 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=20061127080629.21026.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: linkBe 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).