summaryrefslogtreecommitdiffstats
path: root/gcc/function.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1998-09-20 23:29:09 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1998-09-20 23:29:09 +0000
commit2a588794cf93b159760f128f2404ca5628d068aa (patch)
tree4cedb18879450264fbf3614257344386abf12fe5 /gcc/function.c
parent1088838090262886b0211581818ae7a241e2857f (diff)
downloadppe42-gcc-2a588794cf93b159760f128f2404ca5628d068aa.tar.gz
ppe42-gcc-2a588794cf93b159760f128f2404ca5628d068aa.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22507 138bc75d-0d04-0410-961f-82ee72b054a4
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 c75648dbf30..99163e61a3c 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);
}
}
}
OpenPOWER on IntegriCloud