summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.h
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-01 15:49:37 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-01 15:49:37 +0000
commit06f9d6effbf8befe6fc6d6eee368256e79223707 (patch)
tree1b6ee9a54e64f4b81990716e8025ba5a494502fc /gcc/emit-rtl.h
parentb06ab5fa20dbda4293d1ecf45ec0087f4ea4cd82 (diff)
downloadgcc-06f9d6effbf8befe6fc6d6eee368256e79223707.tar.gz
* fwprop.c: Make emit-rtl.h include last.
* rtlanal.c: Include emit-rtl.h. * genautomata.c: Output emit-rtl include into insn-automata.c * df-scan.c: Include emit-rtl.h. * haifa-sched.c: Indlude emit-rtl.h. * mode-switching.c: Indlude emit-rtl.h. * graph.c: Indlude emit-rtl.h. * sel-sched.c: Include emit-rtl.h. * sel-sched-ir.c: Include emit-rtl.h. * ira-build.c: Include emit-rtl.h. * emit-rtl.c: (first_insn, last_insn): Remove defines. (get_insns, set_first_insn, get_last_insn, set_last_insn, get_max_uid): Move to emit-rtl.h. (set_new_first_and_last_insn, get_last_insn_anywhere, get_first_nonnote_insn, get_last_nonnote_insn, try_split, make_call_insn_raw, add_insn_after, add_insn_before, remove_insn, delete_insns_since, reorder_insns_nobb, emit_insn_after_1, emit_debug_insn_before, emit_insn, start_sequence, push_to_sequence, push_to_sequence2, push_topmost_sequence, end_sequence, copy_insn): Use accessor functions. * emit-rtl.h (gen_blockage, gen_rtvec, copy_insn_1, copy_insn, gen_int_mode, emit_copy_of_insn_after, set_reg_attrs_from_value, set_reg_attrs_for_parm, set_reg_attrs_for_decl_rtl, adjust_reg_mode, mem_expr_equal_p): Move here from rtl.h (get_insns, set_first-insn, get_last_insn, set_last_insn, get_max_uid): Move here from emit-rtl.c; make inline. * cfglayout.h: Include emit-rtl.h * rtl.h (gen_blockage, gen_rtvec, copy_insn_1, copy_insn, gen_int_mode, emit_copy_of_insn_after, set_reg_attrs_from_value, set_reg_attrs_for_parm, set_reg_attrs_for_decl_rtl, adjust_reg_mode, mem_expr_equal_p, get_insns, set_first-insn, get_last_insn, set_last_insn, get_max_uid): Move to emit-rtl.h. * reg-stack.c: Include emit-rtl.h * dce.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160111 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.h')
-rw-r--r--gcc/emit-rtl.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/gcc/emit-rtl.h b/gcc/emit-rtl.h
index 01479e1eb5f..704f901f069 100644
--- a/gcc/emit-rtl.h
+++ b/gcc/emit-rtl.h
@@ -51,4 +51,57 @@ extern rtx replace_equiv_address (rtx, rtx);
/* Likewise, but the reference is not required to be valid. */
extern rtx replace_equiv_address_nv (rtx, rtx);
+extern rtx gen_blockage (void);
+extern rtvec gen_rtvec (int, ...);
+extern rtx copy_insn_1 (rtx);
+extern rtx copy_insn (rtx);
+extern rtx gen_int_mode (HOST_WIDE_INT, enum machine_mode);
+extern rtx emit_copy_of_insn_after (rtx, rtx);
+extern void set_reg_attrs_from_value (rtx, rtx);
+extern void set_reg_attrs_for_parm (rtx, rtx);
+extern void set_reg_attrs_for_decl_rtl (tree t, rtx x);
+extern void adjust_reg_mode (rtx, enum machine_mode);
+extern int mem_expr_equal_p (const_tree, const_tree);
+
+/* Return the first insn of the current sequence or current function. */
+
+static inline rtx
+get_insns (void)
+{
+ return crtl->emit.x_first_insn;
+}
+
+/* Specify a new insn as the first in the chain. */
+
+static inline void
+set_first_insn (rtx insn)
+{
+ gcc_assert (!insn || !PREV_INSN (insn));
+ crtl->emit.x_first_insn = insn;
+}
+
+/* Return the last insn emitted in current sequence or current function. */
+
+static inline rtx
+get_last_insn (void)
+{
+ return crtl->emit.x_last_insn;
+}
+
+/* Specify a new insn as the last in the chain. */
+
+static inline void
+set_last_insn (rtx insn)
+{
+ gcc_assert (!insn || !NEXT_INSN (insn));
+ crtl->emit.x_last_insn = insn;
+}
+
+/* Return a number larger than any instruction's uid in this function. */
+
+static inline int
+get_max_uid (void)
+{
+ return crtl->emit.x_cur_insn_uid;
+}
#endif /* GCC_EMIT_RTL_H */