#define GET_NUM_ELEM(RTVEC) ((RTVEC)->num_elem)
#define PUT_NUM_ELEM(RTVEC, NUM) ((RTVEC)->num_elem = (NUM))
-/* Predicate yielding nonzero iff X is an rtl for a register. */
+/* Predicate yielding nonzero iff X is an rtx for a register. */
#define REG_P(X) (GET_CODE (X) == REG)
+/* 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 a label insn. */
#define LABEL_P(X) (GET_CODE (X) == CODE_LABEL)
/* Predicate yielding nonzero iff X is a jump insn. */
#define JUMP_P(X) (GET_CODE (X) == JUMP_INSN)
+/* Predicate yielding nonzero iff X is a call insn. */
+#define CALL_P(X) (GET_CODE (X) == CALL_INSN)
+
+/* Predicate yielding nonzero iff X is an insn that cannot jump. */
+#define NONJUMP_INSN_P(X) (GET_CODE (X) == INSN)
+
+/* Predicate yielding nonzero iff X is a real insn. */
+#define INSN_P(X) \
+ (NONJUMP_INSN_P (X) || JUMP_P (X) || CALL_P (X))
+
/* Predicate yielding nonzero iff X is a note insn. */
#define NOTE_P(X) (GET_CODE (X) == NOTE)
(JUMP_P (INSN) && (GET_CODE (PATTERN (INSN)) == ADDR_VEC || \
GET_CODE (PATTERN (INSN)) == ADDR_DIFF_VEC))
-
-/* 1 if X is an insn. */
-#define INSN_P(X) \
- (GET_RTX_CLASS (GET_CODE(X)) == RTX_INSN)
-
/* 1 if X is a unary operator. */
#define UNARY_P(X) \
/* Opaque data. */
#define NOTE_DATA(INSN) RTL_CHECKC1 (INSN, 4, NOTE)
+#define NOTE_DELETED_LABEL_NAME(INSN) XCSTR (INSN, 4, NOTE)
+#ifdef USE_MAPPED_LOCATION
+#define NOTE_SOURCE_LOCATION(INSN) XCUINT (INSN, 5, NOTE)
+#define NOTE_EXPANDED_LOCATION(XLOC, INSN) \
+ (XLOC) = expand_location (NOTE_SOURCE_LOCATION (INSN))
+#define SET_INSN_DELETED(INSN) \
+ (PUT_CODE (INSN, NOTE), NOTE_LINE_NUMBER (INSN) = NOTE_INSN_DELETED)
+#else
+#define NOTE_EXPANDED_LOCATION(XLOC, INSN) \
+ ((XLOC).file = NOTE_SOURCE_FILE (INSN), \
+ (XLOC).line = NOTE_LINE_NUMBER (INSN))
#define NOTE_SOURCE_FILE(INSN) XCSTR (INSN, 4, NOTE)
+#define SET_INSN_DELETED(INSN) \
+ (PUT_CODE (INSN, NOTE), NOTE_SOURCE_FILE (INSN) = 0, \
+ NOTE_LINE_NUMBER (INSN) = NOTE_INSN_DELETED)
+#endif
#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)
NOTE_INSN_DELETED,
/* These are used to mark the beginning and end of a lexical block.
- See NOTE_BLOCK, identify_blocks and reorder_blocks. */
+ See NOTE_BLOCK and reorder_blocks. */
NOTE_INSN_BLOCK_BEG,
NOTE_INSN_BLOCK_END,
XSTR (XCVECEXP (RTX, 4, N, ASM_OPERANDS), 0)
#define ASM_OPERANDS_INPUT_MODE(RTX, N) \
GET_MODE (XCVECEXP (RTX, 4, N, ASM_OPERANDS))
+#ifdef USE_MAPPED_LOCATION
+#define ASM_OPERANDS_SOURCE_LOCATION(RTX) XCUINT (RTX, 5, ASM_OPERANDS)
+#else
#define ASM_OPERANDS_SOURCE_FILE(RTX) XCSTR (RTX, 5, ASM_OPERANDS)
#define ASM_OPERANDS_SOURCE_LINE(RTX) XCINT (RTX, 6, ASM_OPERANDS)
+#endif
/* 1 if RTX is a mem and we should keep the alias set for this mem
unchanged when we access a component. Set to 1, or example, when we
extern enum reg_class reg_preferred_class (int);
extern enum reg_class reg_alternate_class (int);
-extern rtx get_first_nonparm_insn (void);
-
extern void split_all_insns (int);
extern void split_all_insns_noflow (void);
#ifndef NO_GENRTL_H
#include "genrtl.h"
+#ifndef USE_MAPPED_LOCATION
+#undef gen_rtx_ASM_OPERANDS
+#define gen_rtx_ASM_OPERANDS(MODE, ARG0, ARG1, ARG2, ARG3, ARG4, LOC) \
+ gen_rtx_fmt_ssiEEsi (ASM_OPERANDS, (MODE), (ARG0), (ARG1), (ARG2), (ARG3), (ARG4), (LOC).file, (LOC).line)
+#endif
#endif
/* There are some RTL codes that require special attention; the
extern void reverse_comparison (rtx);
extern void set_new_first_and_last_insn (rtx, rtx);
extern void set_new_last_label_num (int);
+extern void 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 renumber_insns (FILE *);
extern void remove_unnecessary_notes (void);
extern rtx delete_insn (rtx);
+extern rtx entry_of_function (void);
extern void delete_insn_chain (rtx, rtx);
extern rtx unlink_insn_chain (rtx, rtx);
extern rtx delete_insn_and_edges (rtx);
extern void thread_prologue_and_epilogue_insns (rtx);
extern int prologue_epilogue_contains (rtx);
extern int sibcall_epilogue_contains (rtx);
-extern void preserve_rtl_expr_result (rtx);
extern void mark_temp_addr_taken (rtx);
extern void update_temp_slot_address (rtx, rtx);
extern void purge_addressof (rtx);
extern rtx get_reg_known_value (unsigned int);
extern bool get_reg_known_equiv_p (unsigned int);
-/* In sibcall.c */
-typedef enum {
- sibcall_use_normal = 1,
- sibcall_use_tail_recursion,
- sibcall_use_sibcall
-} sibcall_use_t;
-
-extern void optimize_sibling_and_tail_recursive_calls (void);
-extern void replace_call_placeholder (rtx, sibcall_use_t);
-
#ifdef STACK_REGS
extern int stack_regs_mentioned (rtx insn);
#endif