diff options
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r-- | gcc/rtl.h | 57 |
1 files changed, 53 insertions, 4 deletions
@@ -960,6 +960,14 @@ is_a_helper <rtx_call_insn *>::test (rtx_insn *insn) template <> template <> inline bool +is_a_helper <const rtx_call_insn *>::test (const rtx_insn *insn) +{ + return CALL_P (insn); +} + +template <> +template <> +inline bool is_a_helper <rtx_jump_table_data *>::test (rtx rt) { return JUMP_TABLE_DATA_P (rt); @@ -2074,7 +2082,17 @@ const_vector_encoded_nelts (const_rtx x) inline bool always_void_p (enum rtx_code code) { - return code == SET; + switch (code) + { + case SET: + case PC: + case RETURN: + case SIMPLE_RETURN: + return true; + + default: + return false; + } } /* A structure to hold all available cost information about an rtl @@ -2488,7 +2506,8 @@ extern bool subreg_offset_representable_p (unsigned int, machine_mode, poly_uint64, machine_mode); extern unsigned int subreg_regno (const_rtx); extern int simplify_subreg_regno (unsigned int, machine_mode, - poly_uint64, machine_mode); + poly_uint64, machine_mode, + bool allow_stack_regs = false); extern int lowpart_subreg_regno (unsigned int, machine_mode, machine_mode); extern unsigned int subreg_nregs (const_rtx); @@ -3020,6 +3039,36 @@ extern enum rtx_code classify_insn (rtx); extern void dump_rtx_statistics (void); /* In emit-rtl.cc */ + +/* Opcodes used in the bytecode generated by genemit.cc. */ +enum class expand_opcode { + /* NULL_RTX. */ + NO_RTX, + + /* A (match_operand N) or (match_dup N). Followed by the operand number. */ + MATCH_OPERAND, + + /* A (match_operator N) or (match_op_dup N) that preserves the original mode. + Followed by the operand number. */ + MATCH_OPERATOR, + + /* A (match_operator N) or (match_op_dup N) that overrides the original mode. + Followed by the new mode and by the operand number. */ + MATCH_OPERATOR_WITH_MODE, + + /* A (match_parallel N) or (match_par_dup N). Followed by the operand + number. */ + MATCH_PARALLEL, + + /* A (clobber (reg:M R)). Followed by M and R. */ + CLOBBER_REG, + + /* FIRST_CODE + X represents a normal rtx with code X. */ + FIRST_CODE +}; + +extern rtx expand_rtx (const uint8_t *, rtx *); +extern rtx_insn *complete_seq (const uint8_t *, rtx *); extern rtx copy_rtx_if_shared (rtx); /* In rtl.cc */ @@ -3306,7 +3355,7 @@ extern rtx_insn *get_last_nonnote_insn (void); extern void start_sequence (void); extern void push_to_sequence (rtx_insn *); extern void push_to_sequence2 (rtx_insn *, rtx_insn *); -extern void end_sequence (void); +extern rtx_insn *end_sequence (void); #if TARGET_SUPPORTS_WIDE_INT == 0 extern double_int rtx_to_double_int (const_rtx); #endif @@ -3642,7 +3691,6 @@ extern bool nonzero_address_p (const_rtx); extern bool rtx_unstable_p (const_rtx); extern bool rtx_varies_p (const_rtx, bool); extern bool rtx_addr_varies_p (const_rtx, bool); -extern rtx get_call_rtx_from (const rtx_insn *); extern tree get_call_fndecl (const rtx_insn *); extern HOST_WIDE_INT get_integer_term (const_rtx); extern rtx get_related_value (const_rtx); @@ -4532,6 +4580,7 @@ extern void simplify_using_condition (rtx, rtx *, bitmap); extern void compute_alignments (void); extern void update_alignments (vec<rtx> &); extern int asm_str_count (const char *templ); +extern rtx get_call_rtx_from (const rtx_insn *); struct rtl_hooks { |