/* Register Transfer Language (RTL) definitions for GCC
- Copyright (C) 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ Free Software Foundation, Inc.
This file is part of GCC.
/* This structure remembers the position of a SYMBOL_REF within an
object_block structure. A SYMBOL_REF only provides this information
- if SYMBOL_REF_IN_BLOCK_P is true. */
+ if SYMBOL_REF_HAS_BLOCK_INFO_P is true. */
struct block_symbol GTY(()) {
/* The usual SYMBOL_REF fields. */
rtunion GTY ((skip)) fld[3];
order of increasing offset and the following conditions will
hold for each element X:
- SYMBOL_REF_IN_BLOCK_P (X)
+ SYMBOL_REF_HAS_BLOCK_INFO_P (X)
!SYMBOL_REF_ANCHOR_P (X)
SYMBOL_REF_BLOCK (X) == [address of this structure]
SYMBOL_REF_BLOCK_OFFSET (X) >= 0. */
in order of increasing offset, and then increasing TLS model.
The following conditions will hold for each element X in this vector:
- SYMBOL_REF_IN_BLOCK_P (X)
+ SYMBOL_REF_HAS_BLOCK_INFO_P (X)
SYMBOL_REF_ANCHOR_P (X)
SYMBOL_REF_BLOCK (X) == [address of this structure]
SYMBOL_REF_BLOCK_OFFSET (X) >= 0. */
/* Predicate yielding nonzero iff X is an rtx for a memory location. */
#define MEM_P(X) (GET_CODE (X) == MEM)
+/* Predicate yielding nonzero iff X is an rtx for a constant integer. */
+#define CONST_INT_P(X) (GET_CODE (X) == CONST_INT)
+
/* Predicate yielding nonzero iff X is a label insn. */
#define LABEL_P(X) (GET_CODE (X) == CODE_LABEL)
#define BLOCK_SYMBOL_CHECK(RTX) __extension__ \
({ rtx const _symbol = (RTX); \
unsigned int flags = RTL_CHECKC1 (_symbol, 1, SYMBOL_REF).rt_int; \
- if ((flags & SYMBOL_FLAG_IN_BLOCK) == 0) \
+ if ((flags & SYMBOL_FLAG_HAS_BLOCK_INFO) == 0) \
rtl_check_failed_block_symbol (__FILE__, __LINE__, \
__FUNCTION__); \
&_symbol->u.block_sym; })
#define NOTE_BLOCK(INSN) XCTREE (INSN, 4, NOTE)
#define NOTE_EH_HANDLER(INSN) XCINT (INSN, 4, NOTE)
#define NOTE_BASIC_BLOCK(INSN) XCBBDEF (INSN, 4, NOTE)
-#define NOTE_EXPECTED_VALUE(INSN) XCEXP (INSN, 4, NOTE)
#define NOTE_VAR_LOCATION(INSN) XCEXP (INSN, 4, NOTE)
/* In a NOTE that is a line number, this is the line number.
The chain eventually winds up at the CODE_LABEL: it is circular. */
#define LABEL_REFS(LABEL) XCEXP (LABEL, 5, CODE_LABEL)
\f
-/* This is the field in the LABEL_REF through which the circular chain
- of references to a particular label is linked.
- FIXME: This chain is used in loop.c and in the SH backend.
- Since loop.c is about to go away, it could be a win to replace
- the uses of this in the SH backend with something else. */
-#define LABEL_NEXTREF(REF) XCEXP (REF, 1, LABEL_REF)
-
/* For a REG rtx, REGNO extracts the register number. ORIGINAL_REGNO holds
the number the register originally had; for a pseudo register turned into
a hard reg this will hold the old pseudo register number. */
/* For a CONST_INT rtx, INTVAL extracts the integer. */
#define INTVAL(RTX) XCWINT(RTX, 0, CONST_INT)
+#define UINTVAL(RTX) ((unsigned HOST_WIDE_INT) INTVAL (RTX))
/* For a CONST_DOUBLE:
For a VOIDmode, there are two integers CONST_DOUBLE_LOW is the
extern bool subreg_offset_representable_p (unsigned int, enum machine_mode,
unsigned int, enum machine_mode);
extern unsigned int subreg_regno (rtx);
+extern unsigned int subreg_nregs (rtx);
extern unsigned HOST_WIDE_INT nonzero_bits (rtx, enum machine_mode);
extern unsigned int num_sign_bit_copies (rtx, enum machine_mode);
extern bool constant_pool_constant_p (rtx);
MEM_NOTRAP_P (LHS) = MEM_NOTRAP_P (RHS), \
MEM_READONLY_P (LHS) = MEM_READONLY_P (RHS), \
MEM_KEEP_ALIAS_SET_P (LHS) = MEM_KEEP_ALIAS_SET_P (RHS), \
+ MEM_POINTER (LHS) = MEM_POINTER (RHS), \
MEM_ATTRS (LHS) = MEM_ATTRS (RHS))
-/* 1 if RTX is a label_ref to a label outside the loop containing the
- reference. */
-#define LABEL_OUTSIDE_LOOP_P(RTX) \
- (RTL_FLAG_CHECK1("LABEL_OUTSIDE_LOOP_P", (RTX), LABEL_REF)->in_struct)
-
/* 1 if RTX is a label_ref for a nonlocal label. */
/* Likewise in an expr_list for a reg_label note. */
#define LABEL_REF_NONLOCAL_P(RTX) \
#define SYMBOL_REF_EXTERNAL_P(RTX) \
((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_EXTERNAL) != 0)
/* Set if this symbol has a block_symbol structure associated with it. */
-#define SYMBOL_FLAG_IN_BLOCK (1 << 7)
-#define SYMBOL_REF_IN_BLOCK_P(RTX) \
- ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_IN_BLOCK) != 0)
+#define SYMBOL_FLAG_HAS_BLOCK_INFO (1 << 7)
+#define SYMBOL_REF_HAS_BLOCK_INFO_P(RTX) \
+ ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_HAS_BLOCK_INFO) != 0)
/* Set if this symbol is a section anchor. SYMBOL_REF_ANCHOR_P implies
- SYMBOL_REF_IN_BLOCK_P. */
+ SYMBOL_REF_HAS_BLOCK_INFO_P. */
#define SYMBOL_FLAG_ANCHOR (1 << 8)
#define SYMBOL_REF_ANCHOR_P(RTX) \
((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_ANCHOR) != 0)
#define SYMBOL_FLAG_MACH_DEP_SHIFT 9
#define SYMBOL_FLAG_MACH_DEP (1 << SYMBOL_FLAG_MACH_DEP_SHIFT)
-/* The block to which the given SYMBOL_REF belongs. Only valid if
- SYMBOL_REF_IN_BLOCK_P (RTX). */
+/* If SYMBOL_REF_HAS_BLOCK_INFO_P (RTX), this is the object_block
+ structure to which the symbol belongs, or NULL if it has not been
+ assigned a block. */
#define SYMBOL_REF_BLOCK(RTX) (BLOCK_SYMBOL_CHECK (RTX)->block)
-/* The byte offset of the given SYMBOL_REF from the start of its block,
- or a negative value if the symbol has not yet been assigned a position.
- Only valid if SYMBOL_REF_IN_BLOCK_P (RTX). */
+/* If SYMBOL_REF_HAS_BLOCK_INFO_P (RTX), this is the offset of RTX from
+ the first object in SYMBOL_REF_BLOCK (RTX). The value is negative if
+ RTX has not yet been assigned to a block, or it has not been given an
+ offset within that block. */
#define SYMBOL_REF_BLOCK_OFFSET(RTX) (BLOCK_SYMBOL_CHECK (RTX)->offset)
/* Define a macro to look for REG_INC notes,
/* In expmed.c */
extern int ceil_log2 (unsigned HOST_WIDE_INT);
-/* In builtins.c */
-extern rtx expand_builtin_expect_jump (tree, rtx, rtx);
-
/* In explow.c */
extern void set_stack_check_libfunc (rtx);
extern HOST_WIDE_INT trunc_int_for_mode (HOST_WIDE_INT, enum machine_mode);
extern rtvec gen_rtvec_v (int, rtx *);
extern rtx gen_reg_rtx (enum machine_mode);
extern rtx gen_rtx_REG_offset (rtx, enum machine_mode, unsigned int, int);
+extern rtx gen_reg_rtx_offset (rtx, enum machine_mode, int);
extern rtx gen_label_rtx (void);
extern rtx gen_lowpart_common (enum machine_mode, rtx);
extern rtx emit_barrier_after (rtx);
extern rtx emit_label_after (rtx, rtx);
extern rtx emit_note_after (int, rtx);
-extern rtx emit_note_copy_after (rtx, rtx);
extern rtx emit_insn (rtx);
extern rtx emit_jump_insn (rtx);
extern rtx emit_call_insn (rtx);
extern enum rtx_code unsigned_condition (enum rtx_code);
extern enum rtx_code signed_condition (enum rtx_code);
extern void mark_jump_label (rtx, rtx, int);
-extern void cleanup_barriers (void);
+extern unsigned int cleanup_barriers (void);
/* In jump.c */
extern bool squeeze_notes (rtx *, rtx *);
extern int may_trap_or_fault_p (rtx);
extern int inequality_comparisons_p (rtx);
extern rtx replace_rtx (rtx, rtx, rtx);
-extern rtx replace_regs (rtx, rtx *, unsigned int, int);
extern int replace_label (rtx *, void *);
extern int rtx_referenced_p (rtx, rtx);
extern bool tablejump_p (rtx, rtx *, rtx *);
extern int auto_inc_p (rtx);
extern int in_expr_list_p (rtx, rtx);
extern void remove_node_from_expr_list (rtx, rtx *);
-extern int insns_safe_to_move_p (rtx, rtx, rtx *);
extern int loc_mentioned_in_p (rtx *, rtx);
extern rtx find_first_parameter_load (rtx, rtx);
extern bool keep_with_call_p (rtx);
void free_INSN_LIST_node (rtx);
rtx alloc_INSN_LIST (rtx, rtx);
rtx alloc_EXPR_LIST (int, rtx, rtx);
+void remove_free_INSN_LIST_elem (rtx, rtx *);
+rtx remove_list_elem (rtx, rtx *);
/* regclass.c */
extern enum reg_class reg_alternate_class (int);
extern void split_all_insns (int);
-extern void split_all_insns_noflow (void);
+extern unsigned int split_all_insns_noflow (void);
#define MAX_SAVED_CONST_INT 64
extern GTY(()) rtx const_int_rtx[MAX_SAVED_CONST_INT * 2 + 1];
extern int reload_in_progress;
+#ifdef STACK_REGS
+/* Nonzero after end of regstack pass.
+ Set to 1 or 0 by reg-stack.c. */
+extern int regstack_completed;
+#endif
+
/* If this is nonzero, we do not bother generating VOLATILE
around volatile memory references, and we are willing to
output indirect addresses. If cse is to follow, we reject
rtx, rtx, rtx);
extern void delete_for_peephole (rtx, rtx);
extern int condjump_in_parallel_p (rtx);
-extern void purge_line_number_notes (void);
/* In emit-rtl.c. */
extern int max_reg_num (void);
extern void push_topmost_sequence (void);
extern void pop_topmost_sequence (void);
extern void set_new_first_and_last_insn (rtx, rtx);
-extern void unshare_all_rtl (void);
+extern unsigned int unshare_all_rtl (void);
extern void unshare_all_rtl_again (rtx);
extern void unshare_all_rtl_in_chain (rtx);
extern void verify_rtl_sharing (void);
extern void add_insn_before (rtx, rtx);
extern void add_insn_after (rtx, rtx);
extern void remove_insn (rtx);
-extern void emit_insn_after_with_line_notes (rtx, rtx, rtx);
extern rtx emit (rtx);
-extern void renumber_insns (void);
-extern void remove_unnecessary_notes (void);
extern rtx delete_insn (rtx);
extern rtx entry_of_function (void);
+extern void emit_insn_at_entry (rtx);
extern void delete_insn_chain (rtx, rtx);
extern rtx unlink_insn_chain (rtx, rtx);
extern rtx delete_insn_and_edges (rtx);
extern int print_rtl_single (FILE *, rtx);
extern void print_inline_rtx (FILE *, rtx, int);
-/* In loop.c */
-extern void init_loop (void);
-
/* In bt-load.c */
extern void branch_target_load_optimize (bool);
unsigned int, int);
/* In flow.c */
-extern void recompute_reg_usage (void);
extern void delete_dead_jumptables (void);
extern void print_rtl_with_bb (FILE *, rtx);
extern void dump_flow_info (FILE *, int);
/* In predict.c */
extern void invert_br_probabilities (rtx);
extern bool expensive_function_p (int);
+/* In cfgexpand.c */
+extern void add_reg_br_prob_note (rtx last, int probability);
/* In tracer.c */
extern void tracer (unsigned int);
/* In var-tracking.c */
-extern void variable_tracking_main (void);
+extern unsigned int variable_tracking_main (void);
/* In stor-layout.c. */
extern void get_mode_bounds (enum machine_mode, int, enum machine_mode,