aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1998-09-20 16:29:09 -0700
committerRichard Henderson <rth@gcc.gnu.org>1998-09-20 16:29:09 -0700
commitc93b03c2d88093f850864506550044b47bf2ca29 (patch)
tree4cedb18879450264fbf3614257344386abf12fe5 /gcc/function.c
parent823642df46db733e08f43efa826d71f9281b1317 (diff)
downloadgcc-c93b03c2d88093f850864506550044b47bf2ca29.zip
gcc-c93b03c2d88093f850864506550044b47bf2ca29.tar.gz
gcc-c93b03c2d88093f850864506550044b47bf2ca29.tar.bz2
reload1.c (emit_reload_insns): Accept a new arg for the bb.
* reload1.c (emit_reload_insns): Accept a new arg for the bb. Use it to update bb boundaries. Update caller. * function.c (reposition_prologue_and_epilogue_notes): Update bb boundaries wrt the moved note. From-SVN: r22507
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c
index c75648d..99163e6 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -6239,12 +6239,19 @@ reposition_prologue_and_epilogue_notes (f)
&& NOTE_LINE_NUMBER (note) == NOTE_INSN_PROLOGUE_END)
break;
}
+
next = NEXT_INSN (note);
prev = PREV_INSN (note);
if (prev)
NEXT_INSN (prev) = next;
if (next)
PREV_INSN (next) = prev;
+
+ /* Whether or not we can depend on basic_block_head,
+ attempt to keep it up-to-date. */
+ if (basic_block_head[0] == note)
+ basic_block_head[0] = next;
+
add_insn_after (note, insn);
}
}
@@ -6283,7 +6290,14 @@ reposition_prologue_and_epilogue_notes (f)
NEXT_INSN (prev) = next;
if (next)
PREV_INSN (next) = prev;
- add_insn_after (note, PREV_INSN (insn));
+
+ /* Whether or not we can depend on basic_block_head,
+ attempt to keep it up-to-date. */
+ if (n_basic_blocks
+ && basic_block_head[n_basic_blocks-1] == insn)
+ basic_block_head[n_basic_blocks-1] = note;
+
+ add_insn_before (note, insn);
}
}
}