aboutsummaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@freesoft.cz>1999-10-27 03:25:13 +0200
committerRichard Henderson <rth@gcc.gnu.org>1999-10-26 18:25:13 -0700
commita05924f91bc802882777615e301bb79fda1f4035 (patch)
tree7fc24b0621130fa71399fe7a18886374f8f8f7ad /gcc/emit-rtl.c
parentb517dcd29efdce45944072b01e562887bbca276f (diff)
downloadgcc-a05924f91bc802882777615e301bb79fda1f4035.zip
gcc-a05924f91bc802882777615e301bb79fda1f4035.tar.gz
gcc-a05924f91bc802882777615e301bb79fda1f4035.tar.bz2
Reorg reg-stack to use the standard CFG.
Co-Authored-By: Richard Henderson <rth@cygnus.com> From-SVN: r30201
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 1918a43..4e45985 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -50,6 +50,7 @@ Boston, MA 02111-1307, USA. */
#include "real.h"
#include "obstack.h"
#include "bitmap.h"
+#include "basic-block.h"
#include "ggc.h"
/* Commonly used modes. */
@@ -2600,6 +2601,20 @@ emit_insn_before (pattern, before)
return insn;
}
+/* Similar to emit_insn_before, but update basic block boundaries as well. */
+
+rtx
+emit_block_insn_before (pattern, before, block)
+ rtx pattern, before;
+ basic_block block;
+{
+ rtx prev = PREV_INSN (before);
+ rtx r = emit_insn_before (pattern, before);
+ if (block && block->head == before)
+ block->head = NEXT_INSN (prev);
+ return r;
+}
+
/* Make an instruction with body PATTERN and code JUMP_INSN
and output it before the instruction BEFORE. */
@@ -2742,6 +2757,19 @@ emit_insn_after_with_line_notes (pattern, after, from)
insn);
}
+/* Similar to emit_insn_after, but update basic block boundaries as well. */
+
+rtx
+emit_block_insn_after (pattern, after, block)
+ rtx pattern, after;
+ basic_block block;
+{
+ rtx r = emit_insn_after (pattern, after);
+ if (block && block->end == after)
+ block->end = r;
+ return r;
+}
+
/* Make an insn of code JUMP_INSN with body PATTERN
and output it after the insn AFTER. */