/* The kind of expression this is. */
enum rtx_code code : 15;
#endif
+
+ /* Used by the garbage collector. */
+ unsigned gc_mark : 1;
+
/* The kind of value the expression has. */
#ifdef ONLY_INT_FIELDS
int mode : 8;
an aggregate. */
unsigned frame_related : 1;
- /* Used by the garbage collector. */
- unsigned gc_mark : 1;
-
/* The first element of the operands of this rtx.
The number of operands and their types are controlled
by the `code' field, according to rtl.def. */
information as a rtx in the field. */
#define NOTE_SOURCE_FILE(INSN) XCSTR(INSN, 3, NOTE)
-#define NOTE_BLOCK_NUMBER(INSN) XCINT(INSN, 3, NOTE)
+#define NOTE_BLOCK(INSN) XCTREE(INSN, 3, NOTE)
#define NOTE_EH_HANDLER(INSN) XCINT(INSN, 3, NOTE)
#define NOTE_RANGE_INFO(INSN) XCEXP(INSN, 3, NOTE)
#define NOTE_LIVE_INFO(INSN) XCEXP(INSN, 3, NOTE)
#define NOTE_BASIC_BLOCK(INSN) XCBBDEF(INSN, 3, NOTE)
-/* If the NOTE_BLOCK_NUMBER field gets a -1, it means create a new
- block node for a live range block. */
-#define NOTE_BLOCK_LIVE_RANGE_BLOCK -1
-
/* In a NOTE that is a line number, this is the line number.
Other kinds of NOTEs are identified by negative numbers here. */
#define NOTE_LINE_NUMBER(INSN) XCINT(INSN, 4, NOTE)
extern char *oballoc PROTO((int));
extern char *permalloc PROTO((int));
extern rtx rtx_alloc PROTO((RTX_CODE));
-extern rtx obstack_alloc_rtx PROTO((int));
extern rtvec rtvec_alloc PROTO((int));
extern rtx copy_rtx PROTO((rtx));
extern rtx copy_rtx_if_shared PROTO((rtx));
extern rtx convert_memory_address PROTO((enum machine_mode, rtx));
extern rtx memory_address PROTO((enum machine_mode, rtx));
extern rtx get_insns PROTO((void));
+extern const char *get_insn_name PROTO((int));
extern rtx get_last_insn PROTO((void));
extern rtx get_last_insn_anywhere PROTO((void));
extern void start_sequence PROTO((void));
extern rtx regno_use_in PROTO((int, rtx));
extern int auto_inc_p PROTO((rtx));
extern void remove_node_from_expr_list PROTO((rtx, rtx *));
+extern int insns_safe_to_move_p PROTO((rtx, rtx, rtx *));
/* flow.c */
extern void split_block_insns PROTO((int, int));
extern void update_flow_info PROTO((rtx, rtx, rtx, rtx));
-/* Standard pieces of rtx, to be substituted directly into things. */
-#define pc_rtx (&global_rtl.pc_val)
-#define cc0_rtx (&global_rtl.cc0_val)
-
#define MAX_SAVED_CONST_INT 64
-extern struct rtx_def const_int_rtx[MAX_SAVED_CONST_INT * 2 + 1];
+extern rtx const_int_rtx[MAX_SAVED_CONST_INT * 2 + 1];
-#define const0_rtx (&const_int_rtx[MAX_SAVED_CONST_INT])
-#define const1_rtx (&const_int_rtx[MAX_SAVED_CONST_INT+1])
-#define const2_rtx (&const_int_rtx[MAX_SAVED_CONST_INT+2])
-#define constm1_rtx (&const_int_rtx[MAX_SAVED_CONST_INT-1])
+#define const0_rtx (const_int_rtx[MAX_SAVED_CONST_INT])
+#define const1_rtx (const_int_rtx[MAX_SAVED_CONST_INT+1])
+#define const2_rtx (const_int_rtx[MAX_SAVED_CONST_INT+2])
+#define constm1_rtx (const_int_rtx[MAX_SAVED_CONST_INT-1])
extern rtx const_true_rtx;
extern rtx const_tiny_rtx[3][(int) MAX_MACHINE_MODE];
#define CONST1_RTX(MODE) (const_tiny_rtx[1][(int) (MODE)])
#define CONST2_RTX(MODE) (const_tiny_rtx[2][(int) (MODE)])
-extern struct _global_rtl
+/* If HARD_FRAME_POINTER_REGNUM is defined, then a special dummy reg
+ is used to represent the frame pointer. This is because the
+ hard frame pointer and the automatic variables are separated by an amount
+ that cannot be determined until after register allocation. We can assume
+ that in this case ELIMINABLE_REGS will be defined, one action of which
+ will be to eliminate FRAME_POINTER_REGNUM into HARD_FRAME_POINTER_REGNUM. */
+#ifndef HARD_FRAME_POINTER_REGNUM
+#define HARD_FRAME_POINTER_REGNUM FRAME_POINTER_REGNUM
+#endif
+
+/* Index labels for global_rtl. */
+enum global_rtl_index
{
- struct rtx_def pc_val, cc0_val;
- struct rtx_def stack_pointer_val, frame_pointer_val;
- struct rtx_def hard_frame_pointer_val;
- struct rtx_def arg_pointer_val;
- struct rtx_def virtual_incoming_args_val;
- struct rtx_def virtual_stack_vars_val;
- struct rtx_def virtual_stack_dynamic_val;
- struct rtx_def virtual_outgoing_args_val;
- struct rtx_def virtual_cfa_val;
-} global_rtl;
+ GR_PC,
+ GR_CC0,
+ GR_STACK_POINTER,
+ GR_FRAME_POINTER,
+/* For register elimination to work properly these hard_frame_pointer_rtx,
+ frame_pointer_rtx, and arg_pointer_rtx must be the same if they refer to
+ the same register. */
+#if FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM
+ GR_ARG_POINTER = GR_FRAME_POINTER,
+#endif
+#if HARD_FRAME_POINTER_REGNUM == FRAME_POINTER_REGNUM
+ GR_HARD_FRAME_POINTER = GR_FRAME_POINTER,
+#else
+ GR_HARD_FRAME_POINTER,
+#endif
+#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
+#if HARD_FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM
+ GR_ARG_POINTER = GR_HARD_FRAME_POINTER,
+#else
+ GR_ARG_POINTER,
+#endif
+#endif
+ GR_VIRTUAL_INCOMING_ARGS,
+ GR_VIRTUAL_STACK_ARGS,
+ GR_VIRTUAL_STACK_DYNAMIC,
+ GR_VIRTUAL_OUTGOING_ARGS,
+ GR_VIRTUAL_CFA,
+
+ GR_MAX
+};
+
+/* Pointers to standard pieces of rtx are stored here. */
+extern rtx global_rtl[GR_MAX];
+
+/* Standard pieces of rtx, to be substituted directly into things. */
+#define pc_rtx (global_rtl[GR_PC])
+#define cc0_rtx (global_rtl[GR_CC0])
/* All references to certain hard regs, except those created
by allocating pseudo regs into them (when that's possible),
go through these unique rtx objects. */
-#define stack_pointer_rtx (&global_rtl.stack_pointer_val)
-#define frame_pointer_rtx (&global_rtl.frame_pointer_val)
+#define stack_pointer_rtx (global_rtl[GR_STACK_POINTER])
+#define frame_pointer_rtx (global_rtl[GR_FRAME_POINTER])
+#define hard_frame_pointer_rtx (global_rtl[GR_HARD_FRAME_POINTER])
+#define arg_pointer_rtx (global_rtl[GR_ARG_POINTER])
extern rtx pic_offset_table_rtx;
extern rtx struct_value_rtx;
and without prototypes. */
#define GEN_INT(N) gen_rtx_CONST_INT (VOIDmode, (HOST_WIDE_INT) (N))
-/* If HARD_FRAME_POINTER_REGNUM is defined, then a special dummy reg
- is used to represent the frame pointer. This is because the
- hard frame pointer and the automatic variables are separated by an amount
- that cannot be determined until after register allocation. We can assume
- that in this case ELIMINABLE_REGS will be defined, one action of which
- will be to eliminate FRAME_POINTER_REGNUM into HARD_FRAME_POINTER_REGNUM. */
-#ifndef HARD_FRAME_POINTER_REGNUM
-#define HARD_FRAME_POINTER_REGNUM FRAME_POINTER_REGNUM
-#endif
-
-/* For register elimination to work properly these hard_frame_pointer_rtx,
- frame_pointer_rtx, and arg_pointer_rtx must be the same if they refer to
- the same register. */
-#if HARD_FRAME_POINTER_REGNUM == FRAME_POINTER_REGNUM
-#define hard_frame_pointer_rtx (&global_rtl.frame_pointer_val)
-#else
-#define hard_frame_pointer_rtx (&global_rtl.hard_frame_pointer_val)
-#endif
-
-#if FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM
-#define arg_pointer_rtx (&global_rtl.frame_pointer_val)
-#else
-#if HARD_FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM
-#define arg_pointer_rtx (&global_rtl.hard_frame_pointer_val)
-#else
-#define arg_pointer_rtx (&global_rtl.arg_pointer_val)
-#endif
-#endif
-
/* Virtual registers are used during RTL generation to refer to locations into
the stack frame when the actual location isn't known until RTL generation
is complete. The routine instantiate_virtual_regs replaces these with
either by the caller or by the callee when pretending it was passed by the
caller. */
-#define virtual_incoming_args_rtx (&global_rtl.virtual_incoming_args_val)
+#define virtual_incoming_args_rtx (global_rtl[GR_VIRTUAL_INCOMING_ARGS])
#define VIRTUAL_INCOMING_ARGS_REGNUM (FIRST_VIRTUAL_REGISTER)
variable on the stack. Otherwise, it points to the first variable on
the stack. */
-#define virtual_stack_vars_rtx (&global_rtl.virtual_stack_vars_val)
+#define virtual_stack_vars_rtx (global_rtl[GR_VIRTUAL_STACK_ARGS])
#define VIRTUAL_STACK_VARS_REGNUM ((FIRST_VIRTUAL_REGISTER) + 1)
immediately after the stack pointer has been adjusted by the amount
desired. */
-#define virtual_stack_dynamic_rtx (&global_rtl.virtual_stack_dynamic_val)
+#define virtual_stack_dynamic_rtx (global_rtl[GR_VIRTUAL_STACK_DYNAMIC])
#define VIRTUAL_STACK_DYNAMIC_REGNUM ((FIRST_VIRTUAL_REGISTER) + 2)
be written when the stack is pre-pushed (arguments pushed using push
insns always use sp). */
-#define virtual_outgoing_args_rtx (&global_rtl.virtual_outgoing_args_val)
+#define virtual_outgoing_args_rtx (global_rtl[GR_VIRTUAL_OUTGOING_ARGS])
#define VIRTUAL_OUTGOING_ARGS_REGNUM ((FIRST_VIRTUAL_REGISTER) + 3)
frame pointer nor stack pointer are necessarily fixed relative to
the CFA until after reload. */
-#define virtual_cfa_rtx (&global_rtl.virtual_cfa_val)
+#define virtual_cfa_rtx (global_rtl[GR_VIRTUAL_CFA])
#define VIRTUAL_CFA_REGNUM ((FIRST_VIRTUAL_REGISTER) + 4)
extern void allocate_reg_life_data PROTO ((void));
extern void recompute_reg_usage PROTO ((rtx, int));
#ifdef BUFSIZ
+extern void print_rtl_with_bb PROTO ((FILE *, rtx));
extern void dump_flow_info PROTO ((FILE *));
#endif
extern void free_bb_mem PROTO ((void));
extern void bss_section PROTO ((void));
extern int in_data_section PROTO ((void));
extern int supports_one_only PROTO ((void));
+extern void init_varasm_once PROTO ((void));
/* In rtl.c */
extern void init_rtl PROTO ((void));
extern int stack_regs_mentioned PROTO((rtx insn));
#endif
+
+extern void delete_null_pointer_checks PROTO ((rtx));
#endif /* _RTL_H */