Remove some curious inline modifiers
Jan Hubicka
jh@suse.cz
Fri Jan 2 23:48:00 GMT 2004
Hi,
by bootstrapping with -Winline I caught some cases where inline keyword
is ignored for quite valid reasons. In the dwarf2out, c-pretty-print it
is because the inlined functions are recursive.
In the et-forest and mangle the functions are pretty big. Are those
inline keywords dear to someone or can I kill them?
Tested on i686-pc-gnu-linux
Honza
2004-01-03 Jan Hubicka <jh@suse.cz>
* c-pretty-print.c (pp_c_type_cast, pp_c_abstract_declarator,
pp_c_character_constant, pp_c_floating_constant,
pp_c_additive_expression, pp_c_shift_expression,
pp_c_equality_expression, pp_c_and_expression,
pp_c_exclusive_or_expression, pp_c_inclusive_or_expression,
pp_c_logical_and_expression): Remove inline modifier.
* dwarf2out.c (get_AT): Likewise.
* et-forest.c (et_splay): Likewise.
* mangle.c (write_mangled_name): Remove inline modifier.
Index: c-pretty-print.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-pretty-print.c,v
retrieving revision 1.34
diff -c -3 -p -r1.34 c-pretty-print.c
*** c-pretty-print.c 21 Dec 2003 14:08:32 -0000 1.34
--- c-pretty-print.c 2 Jan 2004 23:33:42 -0000
*************** pp_c_cv_qualifier (c_pretty_printer *pp,
*** 157,163 ****
/* Pretty-print T using the type-cast notation '( type-name )'. */
! static inline void
pp_c_type_cast (c_pretty_printer *pp, tree t)
{
pp_c_left_paren (pp);
--- 157,163 ----
/* Pretty-print T using the type-cast notation '( type-name )'. */
! static void
pp_c_type_cast (c_pretty_printer *pp, tree t)
{
pp_c_left_paren (pp);
*************** pp_c_parameter_type_list (c_pretty_print
*** 417,423 ****
pointer
pointer(opt) direct-abstract-declarator */
! static inline void
pp_c_abstract_declarator (c_pretty_printer *pp, tree t)
{
if (TREE_CODE (t) == POINTER_TYPE)
--- 417,423 ----
pointer
pointer(opt) direct-abstract-declarator */
! static void
pp_c_abstract_declarator (c_pretty_printer *pp, tree t)
{
if (TREE_CODE (t) == POINTER_TYPE)
*************** pp_c_integer_constant (c_pretty_printer
*** 768,774 ****
/* Print out a CHARACTER literal. */
! static inline void
pp_c_character_constant (c_pretty_printer *pp, tree c)
{
tree type = TREE_TYPE (c);
--- 768,774 ----
/* Print out a CHARACTER literal. */
! static void
pp_c_character_constant (c_pretty_printer *pp, tree c)
{
tree type = TREE_TYPE (c);
*************** pp_c_enumeration_constant (c_pretty_prin
*** 843,849 ****
/* Print out a REAL value as a decimal-floating-constant. */
! static inline void
pp_c_floating_constant (c_pretty_printer *pp, tree r)
{
real_to_decimal (pp_buffer (pp)->digit_buffer, &TREE_REAL_CST (r),
--- 843,849 ----
/* Print out a REAL value as a decimal-floating-constant. */
! static void
pp_c_floating_constant (c_pretty_printer *pp, tree r)
{
real_to_decimal (pp_buffer (pp)->digit_buffer, &TREE_REAL_CST (r),
*************** pp_c_multiplicative_expression (c_pretty
*** 1402,1408 ****
additive-expression + multiplicative-expression
additive-expression - multiplicative-expression */
! static inline void
pp_c_additive_expression (c_pretty_printer *pp, tree e)
{
enum tree_code code = TREE_CODE (e);
--- 1402,1408 ----
additive-expression + multiplicative-expression
additive-expression - multiplicative-expression */
! static void
pp_c_additive_expression (c_pretty_printer *pp, tree e)
{
enum tree_code code = TREE_CODE (e);
*************** pp_c_additive_expression (c_pretty_print
*** 1431,1437 ****
shift-expression << additive-expression
shift-expression >> additive-expression */
! static inline void
pp_c_shift_expression (c_pretty_printer *pp, tree e)
{
enum tree_code code = TREE_CODE (e);
--- 1431,1437 ----
shift-expression << additive-expression
shift-expression >> additive-expression */
! static void
pp_c_shift_expression (c_pretty_printer *pp, tree e)
{
enum tree_code code = TREE_CODE (e);
*************** pp_c_relational_expression (c_pretty_pri
*** 1493,1499 ****
equality-expression == relational-expression
equality-equality != relational-expression */
! static inline void
pp_c_equality_expression (c_pretty_printer *pp, tree e)
{
enum tree_code code = TREE_CODE (e);
--- 1493,1499 ----
equality-expression == relational-expression
equality-equality != relational-expression */
! static void
pp_c_equality_expression (c_pretty_printer *pp, tree e)
{
enum tree_code code = TREE_CODE (e);
*************** pp_c_equality_expression (c_pretty_print
*** 1518,1524 ****
equality-expression
AND-expression & equality-equality */
! static inline void
pp_c_and_expression (c_pretty_printer *pp, tree e)
{
if (TREE_CODE (e) == BIT_AND_EXPR)
--- 1518,1524 ----
equality-expression
AND-expression & equality-equality */
! static void
pp_c_and_expression (c_pretty_printer *pp, tree e)
{
if (TREE_CODE (e) == BIT_AND_EXPR)
*************** pp_c_and_expression (c_pretty_printer *p
*** 1537,1543 ****
AND-expression
exclusive-OR-expression ^ AND-expression */
! static inline void
pp_c_exclusive_or_expression (c_pretty_printer *pp, tree e)
{
if (TREE_CODE (e) == BIT_XOR_EXPR)
--- 1537,1543 ----
AND-expression
exclusive-OR-expression ^ AND-expression */
! static void
pp_c_exclusive_or_expression (c_pretty_printer *pp, tree e)
{
if (TREE_CODE (e) == BIT_XOR_EXPR)
*************** pp_c_exclusive_or_expression (c_pretty_p
*** 1556,1562 ****
exclusive-OR-expression
inclusive-OR-expression | exclusive-OR-expression */
! static inline void
pp_c_inclusive_or_expression (c_pretty_printer *pp, tree e)
{
if (TREE_CODE (e) == BIT_IOR_EXPR)
--- 1556,1562 ----
exclusive-OR-expression
inclusive-OR-expression | exclusive-OR-expression */
! static void
pp_c_inclusive_or_expression (c_pretty_printer *pp, tree e)
{
if (TREE_CODE (e) == BIT_IOR_EXPR)
*************** pp_c_inclusive_or_expression (c_pretty_p
*** 1575,1581 ****
inclusive-OR-expression
logical-AND-expression && inclusive-OR-expression */
! static inline void
pp_c_logical_and_expression (c_pretty_printer *pp, tree e)
{
if (TREE_CODE (e) == TRUTH_ANDIF_EXPR)
--- 1575,1581 ----
inclusive-OR-expression
logical-AND-expression && inclusive-OR-expression */
! static void
pp_c_logical_and_expression (c_pretty_printer *pp, tree e)
{
if (TREE_CODE (e) == TRUTH_ANDIF_EXPR)
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.468
diff -c -3 -p -r1.468 dwarf2out.c
*** dwarf2out.c 24 Dec 2003 00:14:18 -0000 1.468
--- dwarf2out.c 2 Jan 2004 23:33:47 -0000
*************** AT_lbl (dw_attr_ref a)
*** 4863,4869 ****
/* Get the attribute of type attr_kind. */
! static inline dw_attr_ref
get_AT (dw_die_ref die, enum dwarf_attribute attr_kind)
{
dw_attr_ref a;
--- 4863,4869 ----
/* Get the attribute of type attr_kind. */
! static dw_attr_ref
get_AT (dw_die_ref die, enum dwarf_attribute attr_kind)
{
dw_attr_ref a;
Index: et-forest.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/et-forest.c,v
retrieving revision 1.9
diff -c -3 -p -r1.9 et-forest.c
*** et-forest.c 30 Dec 2003 10:40:52 -0000 1.9
--- et-forest.c 2 Jan 2004 23:33:48 -0000
*************** check_path_after (struct et_occ *occ)
*** 312,318 ****
/* Splay the occurence OCC to the root of the tree. */
! static inline void
et_splay (struct et_occ *occ)
{
struct et_occ *f, *gf, *ggf;
--- 312,318 ----
/* Splay the occurence OCC to the root of the tree. */
! static void
et_splay (struct et_occ *occ)
{
struct et_occ *f, *gf, *ggf;
Index: haifa-sched.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/haifa-sched.c,v
retrieving revision 1.235
diff -c -3 -p -r1.235 haifa-sched.c
*** haifa-sched.c 21 Dec 2003 14:08:34 -0000 1.235
--- haifa-sched.c 2 Jan 2004 23:33:48 -0000
*************** actual_hazard_this_instance (int unit, i
*** 732,738 ****
at time CLOCK. The scheduler using only DFA description should
never use the following function. */
! HAIFA_INLINE static void
schedule_unit (int unit, rtx insn, int clock)
{
int i;
--- 732,738 ----
at time CLOCK. The scheduler using only DFA description should
never use the following function. */
! static void
schedule_unit (int unit, rtx insn, int clock)
{
int i;
*************** schedule_unit (int unit, rtx insn, int c
*** 764,770 ****
was COST. The scheduler using only DFA description should never
use the following function. */
! HAIFA_INLINE static int
actual_hazard (int unit, rtx insn, int clock, int cost)
{
int i;
--- 764,770 ----
was COST. The scheduler using only DFA description should never
use the following function. */
! static int
actual_hazard (int unit, rtx insn, int clock, int cost)
{
int i;
Index: ra.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ra.h,v
retrieving revision 1.8
diff -c -3 -p -r1.8 ra.h
*** ra.h 12 Jul 2003 11:29:18 -0000 1.8
--- ra.h 2 Jan 2004 23:33:48 -0000
*************** extern int flag_ra_spill_every_use;
*** 569,576 ****
/* Nonzero to output all notes in the debug dumps. */
extern int flag_ra_dump_notes;
! extern inline void * ra_alloc (size_t);
! extern inline void * ra_calloc (size_t);
extern int hard_regs_count (HARD_REG_SET);
extern rtx ra_emit_move_insn (rtx, rtx);
extern void ra_debug_msg (unsigned int, const char *, ...) ATTRIBUTE_PRINTF_2;
--- 569,576 ----
/* Nonzero to output all notes in the debug dumps. */
extern int flag_ra_dump_notes;
! extern void * ra_alloc (size_t);
! extern void * ra_calloc (size_t);
extern int hard_regs_count (HARD_REG_SET);
extern rtx ra_emit_move_insn (rtx, rtx);
extern void ra_debug_msg (unsigned int, const char *, ...) ATTRIBUTE_PRINTF_2;
Index: cp/mangle.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/mangle.c,v
retrieving revision 1.94
diff -c -3 -p -r1.94 mangle.c
*** cp/mangle.c 16 Dec 2003 19:50:51 -0000 1.94
--- cp/mangle.c 2 Jan 2004 23:39:17 -0000
*************** find_substitution (tree node)
*** 608,614 ****
<mangled-name> ::= _Z <encoding> */
! static inline void
write_mangled_name (const tree decl, bool top_level)
{
MANGLE_TRACE_TREE ("mangled-name", decl);
--- 608,614 ----
<mangled-name> ::= _Z <encoding> */
! static void
write_mangled_name (const tree decl, bool top_level)
{
MANGLE_TRACE_TREE ("mangled-name", decl);
More information about the Gcc-patches
mailing list