OSDN Git Service

For Marcus - Implement sync primitives inline for ARM.
[pf3gnuchains/gcc-fork.git] / gcc / dce.c
index 19f8e42..2d4f3a6 100644 (file)
--- a/gcc/dce.c
+++ b/gcc/dce.c
@@ -795,7 +795,7 @@ word_dce_process_block (basic_block bb, bool redo_out)
   bitmap_copy (local_live, DF_WORD_LR_OUT (bb));
 
   FOR_BB_INSNS_REVERSE (bb, insn)
-    if (INSN_P (insn))
+    if (NONDEBUG_INSN_P (insn))
       {
        bool any_changed;
        /* No matter if the instruction is needed or not, we remove
@@ -1025,11 +1025,18 @@ rest_of_handle_fast_dce (void)
 void
 run_word_dce (void)
 {
+  int old_flags;
+
+  if (!flag_dce)
+    return;
+
   timevar_push (TV_DCE);
+  old_flags = df_clear_flags (DF_DEFER_INSN_RESCAN + DF_NO_INSN_RESCAN);
   df_word_lr_add_problem ();
   init_dce (true);
   fast_dce (true);
   fini_dce (true);
+  df_set_flags (old_flags);
   timevar_pop (TV_DCE);
 }