aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2011-08-18 12:36:51 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2011-08-18 12:36:51 +0000
commitd51102f3e780e69e19c6d7eeb987647e4a8aff15 (patch)
tree3787f76119cc3035cbfc30cc522d9e6e59efca62 /gcc/rtl.h
parentfdb4f3153312d1195d699421d43fb34ba41e6a58 (diff)
downloadgcc-d51102f3e780e69e19c6d7eeb987647e4a8aff15.zip
gcc-d51102f3e780e69e19c6d7eeb987647e4a8aff15.tar.gz
gcc-d51102f3e780e69e19c6d7eeb987647e4a8aff15.tar.bz2
rtl.h (set_rtx_cost, [...]): New functions.
gcc/ * rtl.h (set_rtx_cost, get_full_set_rtx_cost): New functions. * auto-inc-dec.c (attempt_change): Use set_rtx_cost. * cfgloopanal.c (seq_cost): Likewise. * loop-invariant.c (create_new_invariant): Likewise. * postreload.c (move2add_use_add2_insn, move2add_use_add3_insn) (reload_cse_move2add): Use get_full_set_rtx_cost. From-SVN: r177850
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r--gcc/rtl.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/rtl.h b/gcc/rtl.h
index d5d7b02..84166c4 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1217,6 +1217,24 @@ extern bool constant_pool_constant_p (rtx);
extern bool truncated_to_mode (enum machine_mode, const_rtx);
extern int low_bitmask_len (enum machine_mode, unsigned HOST_WIDE_INT);
+#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, 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, 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