diff options
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r-- | gcc/rtl.h | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/gcc/rtl.h b/gcc/rtl.h index d711ddb9c87..4b2d85535f5 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -2148,9 +2148,9 @@ wi::max_value (machine_mode mode, signop sgn) } extern void init_rtlanal (void); -extern int rtx_cost (rtx, enum rtx_code, int, bool); +extern int rtx_cost (rtx, machine_mode, enum rtx_code, int, bool); extern int address_cost (rtx, machine_mode, addr_space_t, bool); -extern void get_full_rtx_cost (rtx, enum rtx_code, int, +extern void get_full_rtx_cost (rtx, machine_mode, enum rtx_code, int, struct full_rtx_costs *); extern unsigned int subreg_lsb (const_rtx); extern unsigned int subreg_lsb_1 (machine_mode, machine_mode, @@ -2179,43 +2179,6 @@ extern void update_address (struct address_info *); extern HOST_WIDE_INT get_index_scale (const struct address_info *); extern enum rtx_code get_index_code (const struct address_info *); -#ifndef GENERATOR_FILE -/* Return the cost of SET X. SPEED_P is true if optimizing for speed - rather than size. */ - -static inline int -set_rtx_cost (rtx x, bool speed_p) -{ - return rtx_cost (x, INSN, 4, speed_p); -} - -/* Like set_rtx_cost, but return both the speed and size costs in C. */ - -static inline void -get_full_set_rtx_cost (rtx x, struct full_rtx_costs *c) -{ - get_full_rtx_cost (x, INSN, 4, c); -} - -/* Return the cost of moving X into a register, relative to the cost - of a register move. SPEED_P is true if optimizing for speed rather - than size. */ - -static inline int -set_src_cost (rtx x, bool speed_p) -{ - return rtx_cost (x, SET, 1, speed_p); -} - -/* Like set_src_cost, but return both the speed and size costs in C. */ - -static inline void -get_full_set_src_cost (rtx x, struct full_rtx_costs *c) -{ - get_full_rtx_cost (x, SET, 1, c); -} -#endif - /* 1 if RTX is a subreg containing a reg that is already known to be sign- or zero-extended from the mode of the subreg to the mode of the reg. SUBREG_PROMOTED_UNSIGNED_P gives the signedness of the @@ -2647,6 +2610,43 @@ extern int currently_expanding_to_rtl; /* Generally useful functions. */ +#ifndef GENERATOR_FILE +/* Return the cost of SET X. SPEED_P is true if optimizing for speed + rather than size. */ + +static inline int +set_rtx_cost (rtx x, bool speed_p) +{ + return rtx_cost (x, VOIDmode, INSN, 4, speed_p); +} + +/* Like set_rtx_cost, but return both the speed and size costs in C. */ + +static inline void +get_full_set_rtx_cost (rtx x, struct full_rtx_costs *c) +{ + get_full_rtx_cost (x, VOIDmode, INSN, 4, c); +} + +/* Return the cost of moving X into a register, relative to the cost + of a register move. SPEED_P is true if optimizing for speed rather + than size. */ + +static inline int +set_src_cost (rtx x, machine_mode mode, bool speed_p) +{ + return rtx_cost (x, mode, SET, 1, speed_p); +} + +/* Like set_src_cost, but return both the speed and size costs in C. */ + +static inline void +get_full_set_src_cost (rtx x, machine_mode mode, struct full_rtx_costs *c) +{ + get_full_rtx_cost (x, mode, SET, 1, c); +} +#endif + /* In explow.c */ extern HOST_WIDE_INT trunc_int_for_mode (HOST_WIDE_INT, machine_mode); extern rtx plus_constant (machine_mode, rtx, HOST_WIDE_INT, bool = false); |