summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorwood <wood@138bc75d-0d04-0410-961f-82ee72b054a4>1993-03-23 12:52:39 +0000
committerwood <wood@138bc75d-0d04-0410-961f-82ee72b054a4>1993-03-23 12:52:39 +0000
commitab74c92f301455726919ae3320e80198a851bdc4 (patch)
tree459c001bc37a147e01af23ce211762d985e77f40 /gcc/emit-rtl.c
parent76688ff7d8f056d90b8944b942ae353b1f23174c (diff)
downloadgcc-ab74c92f301455726919ae3320e80198a851bdc4.tar.gz
(push_topmost_sequence, pop_topmost_sequence): New
functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@3841 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 31c6d39f0be..47216629de1 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -2614,6 +2614,40 @@ push_to_sequence (first)
last_insn = last;
}
+/* Set up the outer-level insn chain
+ as the current sequence, saving the previously current one. */
+
+void
+push_topmost_sequence ()
+{
+ struct sequence_stack *stack, *top;
+
+ start_sequence ();
+
+ for (stack = sequence_stack; stack; stack = stack->next)
+ top = stack;
+
+ first_insn = top->first;
+ last_insn = top->last;
+}
+
+/* After emitting to the outer-level insn chain, update the outer-level
+ insn chain, and restore the previous saved state. */
+
+void
+pop_topmost_sequence ()
+{
+ struct sequence_stack *stack, *top;
+
+ for (stack = sequence_stack; stack; stack = stack->next)
+ top = stack;
+
+ top->first = first_insn;
+ top->last = last_insn;
+
+ end_sequence ();
+}
+
/* After emitting to a sequence, restore previous saved state.
To get the contents of the sequence just made,