]> gcc.gnu.org Git - gcc.git/commitdiff
reorg.c (relax_delay_slots): Call update_block before redirecting a branch past a...
authorJeff Law <law@gcc.gnu.org>
Mon, 20 May 1996 16:44:05 +0000 (10:44 -0600)
committerJeff Law <law@gcc.gnu.org>
Mon, 20 May 1996 16:44:05 +0000 (10:44 -0600)
* reorg.c (relax_delay_slots): Call update_block before
redirecting a branch past a redundant insn.

From-SVN: r12060

gcc/reorg.c

index 11e5fc7c1ae4d224975a575b64636475fb486cd1..ab303363a972eed2dbc1be47cb5c9a7ad831087d 100644 (file)
@@ -4066,11 +4066,20 @@ relax_delay_slots (first)
          if (trial && GET_CODE (PATTERN (trial)) != SEQUENCE
              && redundant_insn (trial, insn, 0))
            {
-             trial = next_active_insn (trial);
-             if (trial == 0)
-               target_label = find_end_label ();
-             else
-               target_label = get_label_before (trial);
+             rtx tmp;
+
+             /* Figure out where to emit the special USE insn so we don't
+                later incorrectly compute register live/death info.  */
+             tmp = next_active_insn (trial);
+             if (tmp == 0)
+               tmp = find_end_label ();
+
+             /* Insert the special USE insn and update dataflow info.  */
+              update_block (trial, tmp);
+
+             /* Now emit a label before the special USE insn, and
+                redirect our jump to the new label.  */ 
+             target_label = get_label_before (PREV_INSN (tmp));
              reorg_redirect_jump (delay_insn, target_label);
              next = insn;
              continue;
This page took 0.068403 seconds and 5 git commands to generate.