summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2018-09-25 09:13:40 +0200
committerMartin Liska <marxin@gcc.gnu.org>2018-09-25 07:13:40 +0000
commit72744f65a25d36f9cef92d3889ad3f9cb2d4b81e (patch)
treed13b9e077fd15eb7c7cfa4e50a39bd34ad21be58
parenta0464aa0c4a555aae0dbc0ecf586f768cf8cac6a (diff)
Remove unused functions and fields.
2018-09-25 Martin Liska <mliska@suse.cz> * alias.c (set_dest_equal_p): Remove unused function. * config/i386/i386.c (def_builtin_pure2): Likewise. * diagnostic-show-locus.c (class layout): Remove unused field. (layout::layout): Likewise here. * dump-context.h (class temp_dump_context): Likewise. * dwarf2out.c (add_AT_fde_ref): Remove unused function. (add_AT_loclistsptr): Likewise. (add_AT_offset): Likewise. (get_AT_hi_pc): Likewise. (is_comdat_die): Likewise. (type_is_enum): Likewise. (ceiling): Likewise. (add_AT_vms_delta): Likewise. (is_class_die): Likewise. * edit-context.c (class line_event): Remove unused field. * graphite-sese-to-poly.c (tree_int_to_gmp): Remove unused function. * ipa-cp.c (ipa_get_vr_lat): Likewise. * lra-constraints.c (ok_for_index_p_nonstrict): Likewise. (ok_for_base_p_nonstrict): Likewise. * tree-chrec.c (is_not_constant_evolution): Likewise. (chrec_fold_poly_cst): Likewise. * tree-if-conv.c (has_pred_critical_p): Likewise. * tree-ssa-coalesce.c (print_exprs): Likewise. * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise. * tree-ssa-uninit.c (is_and_or_or_p): Likewise. * tree-vrp.c (value_ranges_intersect_p): Likewise. (value_range_nonnegative_p): Likewise. 2018-09-25 Martin Liska <mliska@suse.cz> * name-lookup.c (namespace_scope_ht_size): Remove unused function. * parser.c (cp_lexer_next_token_is_not_keyword): Likewise. 2018-09-25 Martin Liska <mliska@suse.cz> * trans.c (remove_suffix): Remove unused function. 2018-09-25 Martin Liska <mliska@suse.cz> * gofrontend/escape.cc (Gogo::analyze_escape): Remove usage of a parameter. (Gogo::assign_connectivity): Likewise. (class Escape_analysis_tag): Likewise. (Gogo::tag_function): Likewise. * gofrontend/expressions.cc (Call_expression::do_type): Likewise. * gofrontend/gogo.h (class Gogo): Likewise. * gofrontend/types.cc (class Call_multiple_result_type): Likewise. (Type::make_call_multiple_result_type): Likewise. * gofrontend/types.h (class Type): Likewise. * gofrontend/wb.cc (class Check_escape): Likewise. (Gogo::add_write_barriers): Likewise. From-SVN: r264561
-rw-r--r--gcc/ChangeLog32
-rw-r--r--gcc/alias.c9
-rw-r--r--gcc/config/i386/i386.c15
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/name-lookup.c15
-rw-r--r--gcc/cp/parser.c8
-rw-r--r--gcc/diagnostic-show-locus.c2
-rw-r--r--gcc/dump-context.h1
-rw-r--r--gcc/dwarf2out.c141
-rw-r--r--gcc/edit-context.c3
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/trans.c20
-rw-r--r--gcc/go/ChangeLog15
-rw-r--r--gcc/go/gofrontend/escape.cc20
-rw-r--r--gcc/go/gofrontend/expressions.cc2
-rw-r--r--gcc/go/gofrontend/gogo.h2
-rw-r--r--gcc/go/gofrontend/types.cc13
-rw-r--r--gcc/go/gofrontend/types.h2
-rw-r--r--gcc/go/gofrontend/wb.cc10
-rw-r--r--gcc/graphite-sese-to-poly.c8
-rw-r--r--gcc/ipa-cp.c10
-rw-r--r--gcc/lra-constraints.c27
-rw-r--r--gcc/tree-chrec.c47
-rw-r--r--gcc/tree-if-conv.c13
-rw-r--r--gcc/tree-ssa-coalesce.c16
-rw-r--r--gcc/tree-ssa-pre.c6
-rw-r--r--gcc/tree-ssa-uninit.c10
-rw-r--r--gcc/tree-vrp.c38
28 files changed, 76 insertions, 420 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d9dde59c678..f5dcd16a1d4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,37 @@
2018-09-25 Martin Liska <mliska@suse.cz>
+ * alias.c (set_dest_equal_p): Remove unused function.
+ * config/i386/i386.c (def_builtin_pure2): Likewise.
+ * diagnostic-show-locus.c (class layout): Remove
+ unused field.
+ (layout::layout): Likewise here.
+ * dump-context.h (class temp_dump_context): Likewise.
+ * dwarf2out.c (add_AT_fde_ref): Remove unused function.
+ (add_AT_loclistsptr): Likewise.
+ (add_AT_offset): Likewise.
+ (get_AT_hi_pc): Likewise.
+ (is_comdat_die): Likewise.
+ (type_is_enum): Likewise.
+ (ceiling): Likewise.
+ (add_AT_vms_delta): Likewise.
+ (is_class_die): Likewise.
+ * edit-context.c (class line_event): Remove unused field.
+ * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
+ unused function.
+ * ipa-cp.c (ipa_get_vr_lat): Likewise.
+ * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
+ (ok_for_base_p_nonstrict): Likewise.
+ * tree-chrec.c (is_not_constant_evolution): Likewise.
+ (chrec_fold_poly_cst): Likewise.
+ * tree-if-conv.c (has_pred_critical_p): Likewise.
+ * tree-ssa-coalesce.c (print_exprs): Likewise.
+ * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
+ * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
+ * tree-vrp.c (value_ranges_intersect_p): Likewise.
+ (value_range_nonnegative_p): Likewise.
+
+2018-09-25 Martin Liska <mliska@suse.cz>
+
* config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
Do not handle "GNU Pascal".
* config/rs6000/rs6000.c (rs6000_output_function_epilogue):
diff --git a/gcc/alias.c b/gcc/alias.c
index 748da2b6951..7963ece291a 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -3270,15 +3270,6 @@ memory_modified_in_insn_p (const_rtx mem, const_rtx insn)
return memory_modified;
}
-/* Return TRUE if the destination of a set is rtx identical to
- ITEM. */
-static inline bool
-set_dest_equal_p (const_rtx set, const_rtx item)
-{
- rtx dest = SET_DEST (set);
- return rtx_equal_p (dest, item);
-}
-
/* Initialize the aliasing machinery. Initialize the REG_KNOWN_VALUE
array. */
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 052ca63e460..3d76c896d83 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -30221,21 +30221,6 @@ def_builtin_const2 (HOST_WIDE_INT mask, const char *name,
return decl;
}
-/* Like def_builtin, but also marks the function decl "pure". */
-
-static inline tree
-def_builtin_pure2 (HOST_WIDE_INT mask, const char *name,
- enum ix86_builtin_func_type tcode, enum ix86_builtins code)
-{
- tree decl = def_builtin2 (mask, name, tcode, code);
- if (decl)
- DECL_PURE_P (decl) = 1;
- else
- ix86_builtins_isa[(int) code].pure_p = true;
-
- return decl;
-}
-
/* Add any new builtin functions for a given ISA that may not have been
declared. This saves a bit of space compared to adding all of the
declarations to the tree, even if we didn't use them. */
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6d4e93b3a24..9ce845d20ac 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2018-09-25 Martin Liska <mliska@suse.cz>
+
+ * name-lookup.c (namespace_scope_ht_size): Remove
+ unused function.
+ * parser.c (cp_lexer_next_token_is_not_keyword): Likewise.
+
2018-09-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/85070
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index c56bfe58a19..95d2845dd91 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -3291,21 +3291,6 @@ cp_binding_level_debug (cp_binding_level *scope, int line, const char *action)
verbatim ("%s %s %p %d\n", action, desc, (void *) scope, line);
}
-/* Return the estimated initial size of the hashtable of a NAMESPACE
- scope. */
-
-static inline size_t
-namespace_scope_ht_size (tree ns)
-{
- tree name = DECL_NAME (ns);
-
- return name == std_identifier
- ? NAMESPACE_STD_HT_SIZE
- : (name == global_identifier
- ? GLOBAL_SCOPE_HT_SIZE
- : NAMESPACE_ORDINARY_HT_SIZE);
-}
-
/* A chain of binding_level structures awaiting reuse. */
static GTY((deletable)) cp_binding_level *free_binding_level;
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 6e68f2c41dc..6696f174d75 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -922,14 +922,6 @@ cp_lexer_nth_token_is_keyword (cp_lexer* lexer, size_t n, enum rid keyword)
return cp_lexer_peek_nth_token (lexer, n)->keyword == keyword;
}
-/* Return true if the next token is not the indicated KEYWORD. */
-
-static inline bool
-cp_lexer_next_token_is_not_keyword (cp_lexer* lexer, enum rid keyword)
-{
- return cp_lexer_peek_token (lexer)->keyword != keyword;
-}
-
/* Return true if KEYWORD can start a decl-specifier. */
bool
diff --git a/gcc/diagnostic-show-locus.c b/gcc/diagnostic-show-locus.c
index 7dfb0a036cd..43a49ea8913 100644
--- a/gcc/diagnostic-show-locus.c
+++ b/gcc/diagnostic-show-locus.c
@@ -289,7 +289,6 @@ class layout
private:
diagnostic_context *m_context;
pretty_printer *m_pp;
- diagnostic_t m_diagnostic_kind;
location_t m_primary_loc;
expanded_location m_exploc;
colorizer m_colorizer;
@@ -886,7 +885,6 @@ layout::layout (diagnostic_context * context,
diagnostic_t diagnostic_kind)
: m_context (context),
m_pp (context->printer),
- m_diagnostic_kind (diagnostic_kind),
m_primary_loc (richloc->get_range (0)->m_loc),
m_exploc (richloc->get_expanded_location (0)),
m_colorizer (context, diagnostic_kind),
diff --git a/gcc/dump-context.h b/gcc/dump-context.h
index 5ac9dd60e8d..5b20c15cb8b 100644
--- a/gcc/dump-context.h
+++ b/gcc/dump-context.h
@@ -147,7 +147,6 @@ class temp_dump_context
pretty_printer m_pp;
dump_context m_context;
dump_context *m_saved;
- bool m_saved_flag_remarks;
};
#endif /* CHECKING_P */
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 55fcb7be4af..66ee839b5cb 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -3649,7 +3649,6 @@ static void add_AT_specification (dw_die_ref, dw_die_ref);
static inline dw_die_ref AT_ref (dw_attr_node *);
static inline int AT_ref_external (dw_attr_node *);
static inline void set_AT_ref_external (dw_attr_node *, int);
-static void add_AT_fde_ref (dw_die_ref, enum dwarf_attribute, unsigned);
static void add_AT_loc (dw_die_ref, enum dwarf_attribute, dw_loc_descr_ref);
static inline dw_loc_descr_ref AT_loc (dw_attr_node *);
static void add_AT_loc_list (dw_die_ref, enum dwarf_attribute,
@@ -3665,16 +3664,11 @@ static void add_AT_symview (dw_die_ref, enum dwarf_attribute, const char *);
static void add_AT_lbl_id (dw_die_ref, enum dwarf_attribute, const char *);
static void add_AT_lineptr (dw_die_ref, enum dwarf_attribute, const char *);
static void add_AT_macptr (dw_die_ref, enum dwarf_attribute, const char *);
-static void add_AT_loclistsptr (dw_die_ref, enum dwarf_attribute,
- const char *);
-static void add_AT_offset (dw_die_ref, enum dwarf_attribute,
- unsigned HOST_WIDE_INT);
static void add_AT_range_list (dw_die_ref, enum dwarf_attribute,
unsigned long, bool);
static inline const char *AT_lbl (dw_attr_node *);
static dw_attr_node *get_AT (dw_die_ref, enum dwarf_attribute);
static const char *get_AT_low_pc (dw_die_ref);
-static const char *get_AT_hi_pc (dw_die_ref);
static const char *get_AT_string (dw_die_ref, enum dwarf_attribute);
static int get_AT_flag (dw_die_ref, enum dwarf_attribute);
static unsigned get_AT_unsigned (dw_die_ref, enum dwarf_attribute);
@@ -3716,7 +3710,6 @@ static int same_dw_val_p (const dw_val_node *, const dw_val_node *, int *);
static int same_attr_p (dw_attr_node *, dw_attr_node *, int *);
static int same_die_p (dw_die_ref, dw_die_ref, int *);
static int is_type_die (dw_die_ref);
-static int is_comdat_die (dw_die_ref);
static inline bool is_template_instantiation (dw_die_ref);
static int is_declaration_die (dw_die_ref);
static int should_move_die_to_comdat (dw_die_ref);
@@ -3773,7 +3766,6 @@ static int decl_quals (const_tree);
static dw_die_ref modified_type_die (tree, int, bool, dw_die_ref);
static dw_die_ref generic_parameter_die (tree, tree, bool, dw_die_ref);
static dw_die_ref template_parameter_pack_die (tree, tree, dw_die_ref);
-static int type_is_enum (const_tree);
static unsigned int dbx_reg_number (const_rtx);
static void add_loc_descr_op_piece (dw_loc_descr_ref *, int);
static dw_loc_descr_ref reg_loc_descriptor (rtx, enum var_init_status);
@@ -3796,7 +3788,6 @@ static dw_loc_list_ref loc_list_from_tree (tree, int,
struct loc_descr_context *);
static dw_loc_descr_ref loc_descriptor_from_tree (tree, int,
struct loc_descr_context *);
-static HOST_WIDE_INT ceiling (HOST_WIDE_INT, unsigned int);
static tree field_type (const_tree);
static unsigned int simple_type_align_in_bits (const_tree);
static unsigned int simple_decl_align_in_bits (const_tree);
@@ -3910,8 +3901,6 @@ static void prune_unused_types (void);
static int maybe_emit_file (struct dwarf_file_data *fd);
static inline const char *AT_vms_delta1 (dw_attr_node *);
static inline const char *AT_vms_delta2 (dw_attr_node *);
-static inline void add_AT_vms_delta (dw_die_ref, enum dwarf_attribute,
- const char *, const char *);
static void append_entry_to_tmpl_value_parm_die_table (dw_die_ref, tree);
static void gen_remaining_tmpl_value_param_die_attribute (void);
static bool generic_type_p (tree);
@@ -4836,20 +4825,6 @@ set_AT_ref_external (dw_attr_node *a, int i)
a->dw_attr_val.v.val_die_ref.external = i;
}
-/* Add an FDE reference attribute value to a DIE. */
-
-static inline void
-add_AT_fde_ref (dw_die_ref die, enum dwarf_attribute attr_kind, unsigned int targ_fde)
-{
- dw_attr_node attr;
-
- attr.dw_attr = attr_kind;
- attr.dw_attr_val.val_class = dw_val_class_fde_ref;
- attr.dw_attr_val.val_entry = NULL;
- attr.dw_attr_val.v.val_fde_index = targ_fde;
- add_dwarf_attr (die, &attr);
-}
-
/* Add a location description attribute value to a DIE. */
static inline void
@@ -5160,22 +5135,6 @@ AT_file (dw_attr_node *a)
return a->dw_attr_val.v.val_file;
}
-/* Add a vms delta attribute value to a DIE. */
-
-static inline void
-add_AT_vms_delta (dw_die_ref die, enum dwarf_attribute attr_kind,
- const char *lbl1, const char *lbl2)
-{
- dw_attr_node attr;
-
- attr.dw_attr = attr_kind;
- attr.dw_attr_val.val_class = dw_val_class_vms_delta;
- attr.dw_attr_val.val_entry = NULL;
- attr.dw_attr_val.v.val_vms_delta.lbl1 = xstrdup (lbl1);
- attr.dw_attr_val.v.val_vms_delta.lbl2 = xstrdup (lbl2);
- add_dwarf_attr (die, &attr);
-}
-
/* Add a symbolic view identifier attribute value to a DIE. */
static inline void
@@ -5227,22 +5186,6 @@ add_AT_lineptr (dw_die_ref die, enum dwarf_attribute attr_kind,
}
/* Add a section offset attribute value to a DIE, an offset into the
- debug_loclists section. */
-
-static inline void
-add_AT_loclistsptr (dw_die_ref die, enum dwarf_attribute attr_kind,
- const char *label)
-{
- dw_attr_node attr;
-
- attr.dw_attr = attr_kind;
- attr.dw_attr_val.val_class = dw_val_class_loclistsptr;
- attr.dw_attr_val.val_entry = NULL;
- attr.dw_attr_val.v.val_lbl_id = xstrdup (label);
- add_dwarf_attr (die, &attr);
-}
-
-/* Add a section offset attribute value to a DIE, an offset into the
debug_macinfo section. */
static inline void
@@ -5258,21 +5201,6 @@ add_AT_macptr (dw_die_ref die, enum dwarf_attribute attr_kind,
add_dwarf_attr (die, &attr);
}
-/* Add an offset attribute value to a DIE. */
-
-static inline void
-add_AT_offset (dw_die_ref die, enum dwarf_attribute attr_kind,
- unsigned HOST_WIDE_INT offset)
-{
- dw_attr_node attr;
-
- attr.dw_attr = attr_kind;
- attr.dw_attr_val.val_class = dw_val_class_offset;
- attr.dw_attr_val.val_entry = NULL;
- attr.dw_attr_val.v.val_offset = offset;
- add_dwarf_attr (die, &attr);
-}
-
/* Add a range_list attribute value to a DIE. When using
dwarf_split_debug_info, address attributes in dies destined for the
final executable should be direct references--setting the parameter
@@ -5383,18 +5311,6 @@ get_AT_low_pc (dw_die_ref die)
return a ? AT_lbl (a) : NULL;
}
-/* Return the "high pc" attribute value, typically associated with a subprogram
- DIE. Return null if the "high pc" attribute is either not present, or if it
- cannot be represented as an assembler label identifier. */
-
-static inline const char *
-get_AT_hi_pc (dw_die_ref die)
-{
- dw_attr_node *a = get_AT (die, DW_AT_high_pc);
-
- return a ? AT_lbl (a) : NULL;
-}
-
/* Return the value of the string attribute designated by ATTR_KIND, or
NULL if it is not present. */
@@ -7907,36 +7823,6 @@ is_type_die (dw_die_ref die)
}
}
-/* Returns 1 iff C is the sort of DIE that should go into a COMDAT CU.
- Basically, we want to choose the bits that are likely to be shared between
- compilations (types) and leave out the bits that are specific to individual
- compilations (functions). */
-
-static int
-is_comdat_die (dw_die_ref c)
-{
- /* I think we want to leave base types and __vtbl_ptr_type in the main CU, as
- we do for stabs. The advantage is a greater likelihood of sharing between
- objects that don't include headers in the same order (and therefore would
- put the base types in a different comdat). jason 8/28/00 */
-
- if (c->die_tag == DW_TAG_base_type)
- return 0;
-
- if (c->die_tag == DW_TAG_pointer_type
- || c->die_tag == DW_TAG_reference_type
- || c->die_tag == DW_TAG_rvalue_reference_type
- || c->die_tag == DW_TAG_const_type
- || c->die_tag == DW_TAG_volatile_type)
- {
- dw_die_ref t = get_AT_ref (c, DW_AT_type);
-
- return t ? is_comdat_die (t) : 0;
- }
-
- return is_type_die (c);
-}
-
/* Returns true iff C is a compile-unit DIE. */
static inline bool
@@ -7965,15 +7851,6 @@ is_namespace_die (dw_die_ref c)
return c && c->die_tag == DW_TAG_namespace;
}
-/* Returns true iff C is a class or structure DIE. */
-
-static inline bool
-is_class_die (dw_die_ref c)
-{
- return c && (c->die_tag == DW_TAG_class_type
- || c->die_tag == DW_TAG_structure_type);
-}
-
/* Return non-zero if this DIE is a template parameter. */
static inline bool
@@ -13703,15 +13580,6 @@ template_parameter_pack_die (tree parm_pack,
return die;
}
-/* Given a pointer to an arbitrary ..._TYPE tree node, return true if it is
- an enumerated type. */
-
-static inline int
-type_is_enum (const_tree type)
-{
- return TREE_CODE (type) == ENUMERAL_TYPE;
-}
-
/* Return the DBX register number described by a given RTL node. */
static unsigned int
@@ -18933,15 +18801,6 @@ loc_descriptor_from_tree (tree loc, int want_address,
return ret->expr;
}
-/* Given a value, round it up to the lowest multiple of `boundary'
- which is not less than the value itself. */
-
-static inline HOST_WIDE_INT
-ceiling (HOST_WIDE_INT value, unsigned int boundary)
-{
- return (((value + boundary - 1) / boundary) * boundary);
-}
-
/* Given a pointer to what is assumed to be a FIELD_DECL node, return a
pointer to the declared type for the relevant field variable, or return
`integer_type_node' if the given node turns out to be an
diff --git a/gcc/edit-context.c b/gcc/edit-context.c
index 3cdb88d565c..85afc4a2ec7 100644
--- a/gcc/edit-context.c
+++ b/gcc/edit-context.c
@@ -182,7 +182,7 @@ class line_event
{
public:
line_event (int start, int next, int len) : m_start (start),
- m_next (next), m_delta (len - (next - start)) {}
+ m_delta (len - (next - start)) {}
int get_effective_column (int orig_column) const
{
@@ -194,7 +194,6 @@ class line_event
private:
int m_start;
- int m_next;
int m_delta;
};
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 5bc88566ed0..7e1546f93fe 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2018-09-25 Martin Liska <mliska@suse.cz>
+
+ * trans.c (remove_suffix): Remove
+ unused function.
+
2018-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87397
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index 153bab63396..03dc7a284b5 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -61,26 +61,6 @@ gfc_advance_chain (tree t, int n)
return t;
}
-
-/* Strip off a legitimate source ending from the input
- string NAME of length LEN. */
-
-static inline void
-remove_suffix (char *name, int len)
-{
- int i;
-
- for (i = 2; i < 8 && len > i; i++)
- {
- if (name[len - i] == '.')
- {
- name[len - i] = '\0';
- break;
- }
- }
-}
-
-
/* Creates a variable declaration with a given TYPE. */
tree
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog
index 35129223726..afb0a7d6019 100644
--- a/gcc/go/ChangeLog
+++ b/gcc/go/ChangeLog
@@ -1,3 +1,18 @@
+2018-09-25 Martin Liska <mliska@suse.cz>
+
+ * gofrontend/escape.cc (Gogo::analyze_escape): Remove
+ usage of a parameter.
+ (Gogo::assign_connectivity): Likewise.
+ (class Escape_analysis_tag): Likewise.
+ (Gogo::tag_function): Likewise.
+ * gofrontend/expressions.cc (Call_expression::do_type): Likewise.
+ * gofrontend/gogo.h (class Gogo): Likewise.
+ * gofrontend/types.cc (class Call_multiple_result_type): Likewise.
+ (Type::make_call_multiple_result_type): Likewise.
+ * gofrontend/types.h (class Type): Likewise.
+ * gofrontend/wb.cc (class Check_escape): Likewise.
+ (Gogo::add_write_barriers): Likewise.
+
2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
* gospec.c (lang_specific_driver): Handle -r like -nostdlib.
diff --git a/gcc/go/gofrontend/escape.cc b/gcc/go/gofrontend/escape.cc
index 9c31525eb95..d9dcc8993f4 100644
--- a/gcc/go/gofrontend/escape.cc
+++ b/gcc/go/gofrontend/escape.cc
@@ -979,7 +979,7 @@ Gogo::analyze_escape()
for (std::vector<Named_object*>::iterator fn = stack.begin();
fn != stack.end();
++fn)
- this->tag_function(context, *fn);
+ this->tag_function(*fn);
if (this->debug_escape_level() != 0)
{
@@ -1232,10 +1232,10 @@ Escape_analysis_loop::statement(Block*, size_t*, Statement* s)
class Escape_analysis_assign : public Traverse
{
public:
- Escape_analysis_assign(Escape_context* context, Named_object* fn)
+ Escape_analysis_assign(Escape_context* context)
: Traverse(traverse_statements
| traverse_expressions),
- context_(context), fn_(fn)
+ context_(context)
{ }
// Model statements within a function as assignments and flows between nodes.
@@ -1272,8 +1272,6 @@ public:
private:
// The escape context for this set of functions.
Escape_context* context_;
- // The current function being analyzed.
- Named_object* fn_;
};
// Helper function to detect self assignment like the following.
@@ -2703,7 +2701,7 @@ Gogo::assign_connectivity(Escape_context* context, Named_object* fn)
int save_depth = context->loop_depth();
context->set_loop_depth(1);
- Escape_analysis_assign ea(context, fn);
+ Escape_analysis_assign ea(context);
Function::Results* res = fn->func_value()->result_variables();
if (res != NULL)
{
@@ -3266,17 +3264,13 @@ Gogo::propagate_escape(Escape_context* context, Node* dst)
class Escape_analysis_tag
{
public:
- Escape_analysis_tag(Escape_context* context)
- : context_(context)
+ Escape_analysis_tag()
{ }
// Add notes to the function's type about the escape information of its
// input parameters.
void
tag(Named_object* fn);
-
- private:
- Escape_context* context_;
};
void
@@ -3384,9 +3378,9 @@ Escape_analysis_tag::tag(Named_object* fn)
// retain analysis results across imports.
void
-Gogo::tag_function(Escape_context* context, Named_object* fn)
+Gogo::tag_function(Named_object* fn)
{
- Escape_analysis_tag eat(context);
+ Escape_analysis_tag eat;
eat.tag(fn);
}
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc
index 46a1e693d50..91cc30e30b5 100644
--- a/gcc/go/gofrontend/expressions.cc
+++ b/gcc/go/gofrontend/expressions.cc
@@ -10089,7 +10089,7 @@ Call_expression::do_type()
else if (results->size() == 1)
ret = results->begin()->type();
else
- ret = Type::make_call_multiple_result_type(this);
+ ret = Type::make_call_multiple_result_type();
this->type_ = ret;
diff --git a/gcc/go/gofrontend/gogo.h b/gcc/go/gofrontend/gogo.h
index 0864ee1d72a..07d08c2dc60 100644
--- a/gcc/go/gofrontend/gogo.h
+++ b/gcc/go/gofrontend/gogo.h
@@ -680,7 +680,7 @@ class Gogo
// Add notes about the escape level of a function's input and output
// parameters for exporting and importing top level functions.
void
- tag_function(Escape_context*, Named_object*);
+ tag_function(Named_object*);
// Reclaim memory of escape analysis Nodes.
void
diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc
index cc07bfc25bd..ad0704cc2da 100644
--- a/gcc/go/gofrontend/types.cc
+++ b/gcc/go/gofrontend/types.cc
@@ -5466,9 +5466,8 @@ Type::make_nil_type()
class Call_multiple_result_type : public Type
{
public:
- Call_multiple_result_type(Call_expression* call)
- : Type(TYPE_CALL_MULTIPLE_RESULT),
- call_(call)
+ Call_multiple_result_type()
+ : Type(TYPE_CALL_MULTIPLE_RESULT)
{ }
protected:
@@ -5501,18 +5500,14 @@ class Call_multiple_result_type : public Type
void
do_mangled_name(Gogo*, std::string*) const
{ go_assert(saw_errors()); }
-
- private:
- // The expression being called.
- Call_expression* call_;
};
// Make a call result type.
Type*
-Type::make_call_multiple_result_type(Call_expression* call)
+Type::make_call_multiple_result_type()
{
- return new Call_multiple_result_type(call);
+ return new Call_multiple_result_type();
}
// Class Struct_field.
diff --git a/gcc/go/gofrontend/types.h b/gcc/go/gofrontend/types.h
index e011236cba5..85e7c51c302 100644
--- a/gcc/go/gofrontend/types.h
+++ b/gcc/go/gofrontend/types.h
@@ -511,7 +511,7 @@ class Type
make_nil_type();
static Type*
- make_call_multiple_result_type(Call_expression*);
+ make_call_multiple_result_type();
static Struct_type*
make_struct_type(Struct_field_list* fields, Location);
diff --git a/gcc/go/gofrontend/wb.cc b/gcc/go/gofrontend/wb.cc
index 4f84d9950f1..52db71046fe 100644
--- a/gcc/go/gofrontend/wb.cc
+++ b/gcc/go/gofrontend/wb.cc
@@ -189,9 +189,8 @@ Mark_address_taken::expression(Expression** pexpr)
class Check_escape : public Traverse
{
public:
- Check_escape(Gogo* gogo)
- : Traverse(traverse_expressions | traverse_variables),
- gogo_(gogo)
+ Check_escape()
+ : Traverse(traverse_expressions | traverse_variables)
{ }
int
@@ -199,9 +198,6 @@ class Check_escape : public Traverse
int
variable(Named_object*);
-
- private:
- Gogo* gogo_;
};
int
@@ -621,7 +617,7 @@ Gogo::add_write_barriers()
{
this->propagate_writebarrierrec();
- Check_escape chk(this);
+ Check_escape chk;
this->traverse(&chk);
}
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 4dcc013f6bb..69898d4ffd8 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -58,14 +58,6 @@ along with GCC; see the file COPYING3. If not see
#include "graphite.h"
-/* Assigns to RES the value of the INTEGER_CST T. */
-
-static inline void
-tree_int_to_gmp (tree t, mpz_t res)
-{
- wi::to_mpz (wi::to_wide (t), res, TYPE_SIGN (TREE_TYPE (t)));
-}
-
/* Return an isl identifier for the polyhedral basic block PBB. */
static isl_id *
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index afc45969558..27ae8e0fe27 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -405,16 +405,6 @@ ipa_get_poly_ctx_lat (struct ipa_node_params *info, int i)
return &plats->ctxlat;
}
-/* Return the lattice corresponding to the value range of the Ith formal
- parameter of the function described by INFO. */
-
-static inline ipcp_vr_lattice *
-ipa_get_vr_lat (struct ipa_node_params *info, int i)
-{
- struct ipcp_param_lattices *plats = ipa_get_parm_lattices (info, i);
- return &plats->m_value_range;
-}
-
/* Return whether LAT is a lattice with a single constant and without an
undefined value. */
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index 8be4d46c8ad..774d1ff3aaa 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -630,33 +630,6 @@ get_reload_reg (enum op_type type, machine_mode mode, rtx original,
}
-
-/* The page contains code to extract memory address parts. */
-
-/* Wrapper around REGNO_OK_FOR_INDEX_P, to allow pseudos. */
-static inline bool
-ok_for_index_p_nonstrict (rtx reg)
-{
- unsigned regno = REGNO (reg);
-
- return regno >= FIRST_PSEUDO_REGISTER || REGNO_OK_FOR_INDEX_P (regno);
-}
-
-/* A version of regno_ok_for_base_p for use here, when all pseudos
- should count as OK. Arguments as for regno_ok_for_base_p. */
-static inline bool
-ok_for_base_p_nonstrict (rtx reg, machine_mode mode, addr_space_t as,
- enum rtx_code outer_code, enum rtx_code index_code)
-{
- unsigned regno = REGNO (reg);
-
- if (regno >= FIRST_PSEUDO_REGISTER)
- return true;
- return ok_for_base_p_1 (regno, mode, as, outer_code, index_code);
-}
-
-
-
/* The page contains major code to choose the current insn alternative
and generate reloads for it. */
diff --git a/gcc/tree-chrec.c b/gcc/tree-chrec.c
index fa8c2ee2a20..2717b40485b 100644
--- a/gcc/tree-chrec.c
+++ b/gcc/tree-chrec.c
@@ -41,53 +41,6 @@ along with GCC; see the file COPYING3. If not see
/* Extended folder for chrecs. */
-/* Determines whether CST is not a constant evolution. */
-
-static inline bool
-is_not_constant_evolution (const_tree cst)
-{
- return (TREE_CODE (cst) == POLYNOMIAL_CHREC);
-}
-
-/* Fold CODE for a polynomial function and a constant. */
-
-static inline tree
-chrec_fold_poly_cst (enum tree_code code,
- tree type,
- tree poly,
- tree cst)
-{
- gcc_assert (poly);
- gcc_assert (cst);
- gcc_assert (TREE_CODE (poly) == POLYNOMIAL_CHREC);
- gcc_checking_assert (!is_not_constant_evolution (cst));
- gcc_checking_assert (useless_type_conversion_p (type, chrec_type (poly)));
-
- switch (code)
- {
- case PLUS_EXPR:
- return build_polynomial_chrec
- (CHREC_VARIABLE (poly),
- chrec_fold_plus (type, CHREC_LEFT (poly), cst),
- CHREC_RIGHT (poly));
-
- case MINUS_EXPR:
- return build_polynomial_chrec
- (CHREC_VARIABLE (poly),
- chrec_fold_minus (type, CHREC_LEFT (poly), cst),
- CHREC_RIGHT (poly));
-
- case MULT_EXPR:
- return build_polynomial_chrec
- (CHREC_VARIABLE (poly),
- chrec_fold_multiply (type, CHREC_LEFT (poly), cst),
- chrec_fold_multiply (type, CHREC_RIGHT (poly), cst));
-
- default:
- return chrec_dont_know;
- }
-}
-
/* Fold the addition of two polynomial functions. */
static inline tree
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index 77eefac4e34..52aa5756c94 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -1114,19 +1114,6 @@ all_preds_critical_p (basic_block bb)
return true;
}
-/* Returns true if at least one successor in on critical edge. */
-static inline bool
-has_pred_critical_p (basic_block bb)
-{
- edge e;
- edge_iterator ei;
-
- FOR_EACH_EDGE (e, ei, bb->preds)
- if (EDGE_COUNT (e->src->succs) > 1)
- return true;
- return false;
-}
-
/* Return true when BB is if-convertible. This routine does not check
basic block's statements and phis.
diff --git a/gcc/tree-ssa-coalesce.c b/gcc/tree-ssa-coalesce.c
index c123449bdda..a17c7749482 100644
--- a/gcc/tree-ssa-coalesce.c
+++ b/gcc/tree-ssa-coalesce.c
@@ -988,22 +988,6 @@ build_ssa_conflict_graph (tree_live_info_p liveinfo)
return graph;
}
-
-/* Shortcut routine to print messages to file F of the form:
- "STR1 EXPR1 STR2 EXPR2 STR3." */
-
-static inline void
-print_exprs (FILE *f, const char *str1, tree expr1, const char *str2,
- tree expr2, const char *str3)
-{
- fprintf (f, "%s", str1);
- print_generic_expr (f, expr1, TDF_SLIM);
- fprintf (f, "%s", str2);
- print_generic_expr (f, expr2, TDF_SLIM);
- fprintf (f, "%s", str3);
-}
-
-
/* Print a failure to coalesce a MUST_COALESCE pair X and Y. */
static inline void
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 267086cdf48..d1b0cc0c26f 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -825,12 +825,6 @@ bitmap_set_contains_value (bitmap_set_t set, unsigned int value_id)
return bitmap_bit_p (&set->values, value_id);
}
-static inline bool
-bitmap_set_contains_expr (bitmap_set_t set, const pre_expr expr)
-{
- return bitmap_bit_p (&set->expressions, get_expression_id (expr));
-}
-
/* Return true if two bitmap sets are equal. */
static bool
diff --git a/gcc/tree-ssa-uninit.c b/gcc/tree-ssa-uninit.c
index f3e42ddbd7f..d2c50344f71 100644
--- a/gcc/tree-ssa-uninit.c
+++ b/gcc/tree-ssa-uninit.c
@@ -1586,16 +1586,6 @@ is_superset_of (pred_chain_union preds1, pred_chain_union preds2)
return true;
}
-/* Returns true if TC is AND or OR. */
-
-static inline bool
-is_and_or_or_p (enum tree_code tc, tree type)
-{
- return (tc == BIT_IOR_EXPR
- || (tc == BIT_AND_EXPR
- && (type == 0 || TREE_CODE (type) == BOOLEAN_TYPE)));
-}
-
/* Returns true if X1 is the negate of X2. */
static inline bool
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index ab222a385f6..f95437b3040 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -844,27 +844,6 @@ value_inside_range (tree val, tree min, tree max)
}
-/* Return true if value ranges VR0 and VR1 have a non-empty
- intersection.
-
- Benchmark compile/20001226-1.c compilation time after changing this
- function.
- */
-
-static inline bool
-value_ranges_intersect_p (const value_range *vr0, const value_range *vr1)
-{
- /* The value ranges do not intersect if the maximum of the first range is
- less than the minimum of the second range or vice versa.
- When those relations are unknown, we can't do any better. */
- if (operand_less_p (vr0->max, vr1->min) != 0)
- return false;
- if (operand_less_p (vr1->max, vr0->min) != 0)
- return false;
- return true;
-}
-
-
/* Return TRUE if *VR includes the value zero. */
bool
@@ -886,23 +865,6 @@ range_includes_zero_p (const value_range *vr)
return value_inside_range (zero, vr->min, vr->max) != 0;
}
-/* Return true if *VR is know to only contain nonnegative values. */
-
-static inline bool
-value_range_nonnegative_p (const value_range *vr)
-{
- /* Testing for VR_ANTI_RANGE is not useful here as any anti-range
- which would return a useful value should be encoded as a
- VR_RANGE. */
- if (vr->type == VR_RANGE)
- {
- int result = compare_values (vr->min, integer_zero_node);
- return (result == 0 || result == 1);
- }
-
- return false;
-}
-
/* If *VR has a value rante that is a single constant value return that,
otherwise return NULL_TREE. */