From: Richard Sandiford Date: Fri, 18 Nov 2016 18:26:34 +0000 (+0000) Subject: Make load_extend_op an inline function X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=421619baa5438bb2ba02cbe2b2cf2af8a2440bff;p=gcc.git Make load_extend_op an inline function gcc/ * rtlanal.c (load_extend_op): Move to... * rtl.h: ...here and make inline. From-SVN: r242601 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 062999c28a2..ff3da213d3d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-11-18 Richard Sandiford + + * rtlanal.c (load_extend_op): Move to... + * rtl.h: ...here and make inline. + 2016-11-18 Terry Guo Thomas Preud'homme diff --git a/gcc/rtl.h b/gcc/rtl.h index 6a4cf36d9b2..30a42fc1b6a 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -2954,7 +2954,6 @@ extern void set_insn_deleted (rtx); /* Functions in rtlanal.c */ -extern rtx_code load_extend_op (machine_mode); extern rtx single_set_2 (const rtx_insn *, const_rtx); extern bool contains_symbol_ref_p (const_rtx); extern bool contains_symbolic_reference_p (const_rtx); @@ -3771,6 +3770,19 @@ struct GTY(()) cgraph_rtl_info { unsigned function_used_regs_valid: 1; }; +/* If loads from memories of mode MODE always sign or zero extend, + return SIGN_EXTEND or ZERO_EXTEND as appropriate. Return UNKNOWN + otherwise. */ + +inline rtx_code +load_extend_op (machine_mode mode) +{ + if (SCALAR_INT_MODE_P (mode) + && GET_MODE_PRECISION (mode) < BITS_PER_WORD) + return LOAD_EXTEND_OP (mode); + return UNKNOWN; +} + /* gtype-desc.c. */ extern void gt_ggc_mx (rtx &); extern void gt_pch_nx (rtx &); diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index f07a77ae6f2..55a9d2cc509 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -3863,19 +3863,6 @@ subreg_nregs_with_regno (unsigned int regno, const_rtx x) return info.nregs; } -/* If loads from memories of mode MODE always sign or zero extend, - return SIGN_EXTEND or ZERO_EXTEND as appropriate. Return UNKNOWN - otherwise. */ - -rtx_code -load_extend_op (machine_mode mode) -{ - if (SCALAR_INT_MODE_P (mode) - && GET_MODE_PRECISION (mode) < BITS_PER_WORD) - return LOAD_EXTEND_OP (mode); - return UNKNOWN; -} - struct parms_set_data { int nregs;