]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcse.c (insert_insn_end_basic_block): Update signature, remove unused checks.
authorMaxim Kuvyrkov <maxim@codesourcery.com>
Tue, 27 Jul 2010 19:39:15 +0000 (19:39 +0000)
committerMaxim Kuvyrkov <mkuvyrkov@gcc.gnu.org>
Tue, 27 Jul 2010 19:39:15 +0000 (19:39 +0000)
* gcse.c (insert_insn_end_basic_block): Update signature, remove
unused checks.
(pre_edge_insert, hoist_code): Update.

From-SVN: r162593

gcc/ChangeLog
gcc/gcse.c

index d1b8c548c287c10f9b8b7040b3145791b023cb2c..cb9e3b8f9151b8a519c5ac5f7452b6b6361d7261 100644 (file)
@@ -1,3 +1,9 @@
+2010-07-27  Maxim Kuvyrkov  <maxim@codesourcery.com>
+
+       * gcse.c (insert_insn_end_basic_block): Update signature, remove
+       unused checks.
+       (pre_edge_insert, hoist_code): Update.
+
 2010-07-27  Maxim Kuvyrkov  <maxim@codesourcery.com>
 
        PR target/42495
index 9bb0bbd8061af49324b915f28c90f29c466af644..fc1013b78f79e2cf2ef7f946860e29cc6db50cb5 100644 (file)
@@ -500,7 +500,7 @@ static void free_pre_mem (void);
 static void compute_pre_data (void);
 static int pre_expr_reaches_here_p (basic_block, struct expr *,
                                    basic_block);
-static void insert_insn_end_basic_block (struct expr *, basic_block, int);
+static void insert_insn_end_basic_block (struct expr *, basic_block);
 static void pre_insert_copy_insn (struct expr *, rtx);
 static void pre_insert_copies (void);
 static int pre_delete (void);
@@ -3535,14 +3535,10 @@ process_insert_insn (struct expr *expr)
 
 /* Add EXPR to the end of basic block BB.
 
-   This is used by both the PRE and code hoisting.
-
-   For PRE, we want to verify that the expr is either transparent
-   or locally anticipatable in the target block.  This check makes
-   no sense for code hoisting.  */
+   This is used by both the PRE and code hoisting.  */
 
 static void
-insert_insn_end_basic_block (struct expr *expr, basic_block bb, int pre)
+insert_insn_end_basic_block (struct expr *expr, basic_block bb)
 {
   rtx insn = BB_END (bb);
   rtx new_insn;
@@ -3569,12 +3565,6 @@ insert_insn_end_basic_block (struct expr *expr, basic_block bb, int pre)
 #ifdef HAVE_cc0
       rtx note;
 #endif
-      /* It should always be the case that we can put these instructions
-        anywhere in the basic block with performing PRE optimizations.
-        Check this.  */
-      gcc_assert (!NONJUMP_INSN_P (insn) || !pre
-                 || TEST_BIT (antloc[bb->index], expr->bitmap_index)
-                 || TEST_BIT (transp[bb->index], expr->bitmap_index));
 
       /* If this is a jump table, then we can't insert stuff here.  Since
         we know the previous real insn must be the tablejump, we insert
@@ -3611,15 +3601,7 @@ insert_insn_end_basic_block (struct expr *expr, basic_block bb, int pre)
       /* Keeping in mind targets with small register classes and parameters
          in registers, we search backward and place the instructions before
         the first parameter is loaded.  Do this for everyone for consistency
-        and a presumption that we'll get better code elsewhere as well.
-
-        It should always be the case that we can put these instructions
-        anywhere in the basic block with performing PRE optimizations.
-        Check this.  */
-
-      gcc_assert (!pre
-                 || TEST_BIT (antloc[bb->index], expr->bitmap_index)
-                 || TEST_BIT (transp[bb->index], expr->bitmap_index));
+        and a presumption that we'll get better code elsewhere as well.  */
 
       /* Since different machines initialize their parameter registers
         in different orders, assume nothing.  Collect the set of all
@@ -3716,7 +3698,7 @@ pre_edge_insert (struct edge_list *edge_list, struct expr **index_map)
                           now.  */
 
                        if (eg->flags & EDGE_ABNORMAL)
-                         insert_insn_end_basic_block (index_map[j], bb, 0);
+                         insert_insn_end_basic_block (index_map[j], bb);
                        else
                          {
                            insn = process_insert_insn (index_map[j]);
@@ -4595,7 +4577,7 @@ hoist_code (void)
 
                      if (!insn_inserted_p)
                        {
-                         insert_insn_end_basic_block (index_map[i], bb, 0);
+                         insert_insn_end_basic_block (index_map[i], bb);
                          insn_inserted_p = 1;
                        }
                    }