]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
lcm.c (optimize_mode_switching): Free ptr even when mode_set is NULL_RTX.
authorKazu Hirata <kazu@gcc.gnu.org>
Sun, 12 Dec 2004 03:05:20 +0000 (03:05 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Sun, 12 Dec 2004 03:05:20 +0000 (03:05 +0000)
* lcm.c (optimize_mode_switching): Free ptr even when mode_set
is NULL_RTX.

From-SVN: r92044

gcc/ChangeLog
gcc/lcm.c

index c2e586500a21fdc509b4705ba6466d0a7a818d49..66b47081c140291ecc47dd660897bbf664dd2a54 100644 (file)
@@ -1,4 +1,9 @@
-2004-12-11  Roger Sayle  <roger@eyesopen.com>
+2004-12-12  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * lcm.c (optimize_mode_switching): Free ptr even when mode_set
+       is NULL_RTX.
+
+2004-12-12  Roger Sayle  <roger@eyesopen.com>
 
        * reg-stack.c (change_stack): Avoid placing the new top-of-stack in
        its correct location during popping if we need to permute the stack
index 2c4f3fad847c6ee07e385af0566dd2106e319a19..25df2e63cb67bdc5f5653de72ffc9624a5a6ce90 100644 (file)
--- a/gcc/lcm.c
+++ b/gcc/lcm.c
@@ -1274,17 +1274,17 @@ optimize_mode_switching (FILE *file)
                  mode_set = get_insns ();
                  end_sequence ();
 
-                 /* Do not bother to insert empty sequence.  */
-                 if (mode_set == NULL_RTX)
-                   continue;
-
-                 emited = true;
-                 if (NOTE_P (ptr->insn_ptr)
-                     && (NOTE_LINE_NUMBER (ptr->insn_ptr)
-                         == NOTE_INSN_BASIC_BLOCK))
-                   emit_insn_after (mode_set, ptr->insn_ptr);
-                 else
-                   emit_insn_before (mode_set, ptr->insn_ptr);
+                 /* Insert MODE_SET only if it is nonempty.  */
+                 if (mode_set != NULL_RTX)
+                   {
+                     emited = true;
+                     if (NOTE_P (ptr->insn_ptr)
+                         && (NOTE_LINE_NUMBER (ptr->insn_ptr)
+                             == NOTE_INSN_BASIC_BLOCK))
+                       emit_insn_after (mode_set, ptr->insn_ptr);
+                     else
+                       emit_insn_before (mode_set, ptr->insn_ptr);
+                   }
                }
 
              free (ptr);