summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-02-13 14:49:34 +0100
committerMartin Liska <marxin@gcc.gnu.org>2019-02-13 13:49:34 +0000
commitdbcdd5612f98d84c4d37769944af28b8d89a1aa3 (patch)
tree130c147f9d03f07adfcd2b450c17bbc2f2197b25
parentf17130a609e04ed5980d27bbc7df4922f1e087db (diff)
Clean up MPX-related stuff.
2019-02-13 Martin Liska <mliska@suse.cz> * builtins.h (expand_builtin_with_bounds): Remove declaration. * calls.c (struct arg_data): Remove special_slot, pointer_arg and pointer_offset fields. (initialize_argument_information): Remove usage of dead fields. * cgraph.h (struct cgraph_thunk_info): Remove add_pointer_bounds_args. * cgraphunit.c (cgraph_node::expand_thunk): Remove usage of dead fields. (cgraph_node::assemble_thunks_and_aliases): Remove usage of dead fields. * config/i386/i386.c (ix86_function_arg_advance): Remove unrelated comment. (struct builtin_isa): Remove leaf_p and nothrow_p fields. (def_builtin): Remove usage of dead fields. (ix86_add_new_builtins): Likewise. * ipa-fnsummary.c (compute_fn_summary): Likewise. * ipa-icf.c (sem_function::equals_wpa): Likewise. (sem_function::init): Likewise. (sem_variable::merge): Likewise. * ipa-visibility.c (function_and_variable_visibility): Likewise. * ipa.c (symbol_table::remove_unreachable_nodes): Likewise. * lto-cgraph.c (lto_output_node): Likewise. (lto_output_varpool_node): Likewise. (input_node): Likewise. (input_varpool_node): Likewise. * lto-streamer-out.c (lto_output): Likewise. * tree-inline.c (expand_call_inline): Remove usage of assign_stmts. * tree-inline.h (struct copy_body_data): Likewise. * varpool.c (varpool_node::dump): Likewise. From-SVN: r268844
-rw-r--r--gcc/ChangeLog35
-rw-r--r--gcc/builtins.h1
-rw-r--r--gcc/calls.c14
-rw-r--r--gcc/cgraph.h7
-rw-r--r--gcc/cgraphunit.c8
-rw-r--r--gcc/config/i386/i386.c13
-rw-r--r--gcc/ipa-fnsummary.c18
-rw-r--r--gcc/ipa-icf.c5
-rw-r--r--gcc/ipa-visibility.c1
-rw-r--r--gcc/ipa.c6
-rw-r--r--gcc/lto-cgraph.c6
-rw-r--r--gcc/lto-streamer-out.c3
-rw-r--r--gcc/tree-inline.c2
-rw-r--r--gcc/tree-inline.h3
-rw-r--r--gcc/varpool.c2
15 files changed, 40 insertions, 84 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dc4d5475ec5..a6ef20cb716 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,38 @@
+2019-02-13 Martin Liska <mliska@suse.cz>
+
+ * builtins.h (expand_builtin_with_bounds): Remove declaration.
+ * calls.c (struct arg_data): Remove special_slot, pointer_arg
+ and pointer_offset fields.
+ (initialize_argument_information): Remove usage of dead
+ fields.
+ * cgraph.h (struct cgraph_thunk_info): Remove
+ add_pointer_bounds_args.
+ * cgraphunit.c (cgraph_node::expand_thunk): Remove usage of dead
+ fields.
+ (cgraph_node::assemble_thunks_and_aliases): Remove usage of dead
+ fields.
+ * config/i386/i386.c (ix86_function_arg_advance): Remove
+ unrelated comment.
+ (struct builtin_isa): Remove leaf_p and nothrow_p fields.
+ (def_builtin): Remove usage of dead
+ fields.
+ (ix86_add_new_builtins): Likewise.
+ * ipa-fnsummary.c (compute_fn_summary): Likewise.
+ * ipa-icf.c (sem_function::equals_wpa): Likewise.
+ (sem_function::init): Likewise.
+ (sem_variable::merge): Likewise.
+ * ipa-visibility.c (function_and_variable_visibility): Likewise.
+ * ipa.c (symbol_table::remove_unreachable_nodes): Likewise.
+ * lto-cgraph.c (lto_output_node): Likewise.
+ (lto_output_varpool_node): Likewise.
+ (input_node): Likewise.
+ (input_varpool_node): Likewise.
+ * lto-streamer-out.c (lto_output): Likewise.
+ * tree-inline.c (expand_call_inline): Remove usage of
+ assign_stmts.
+ * tree-inline.h (struct copy_body_data): Likewise.
+ * varpool.c (varpool_node::dump): Likewise.
+
2019-02-13 Jakub Jelinek <jakub@redhat.com>
PR middle-end/89303
diff --git a/gcc/builtins.h b/gcc/builtins.h
index 3ec4ba09b66..599c96e72e1 100644
--- a/gcc/builtins.h
+++ b/gcc/builtins.h
@@ -119,7 +119,6 @@ extern void expand_builtin_trap (void);
extern void expand_ifn_atomic_bit_test_and (gcall *);
extern void expand_ifn_atomic_compare_exchange (gcall *);
extern rtx expand_builtin (tree, rtx, rtx, machine_mode, int);
-extern rtx expand_builtin_with_bounds (tree, rtx, rtx, machine_mode, int);
extern enum built_in_function builtin_mathfn_code (const_tree);
extern tree fold_builtin_expect (location_t, tree, tree, tree, tree);
extern bool avoid_folding_inline_builtin (tree);
diff --git a/gcc/calls.c b/gcc/calls.c
index e11977e98df..63c1bc52077 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -82,15 +82,6 @@ struct arg_data
/* If REG is a PARALLEL, this is a copy of VALUE pulled into the correct
form for emit_group_move. */
rtx parallel_value;
- /* If value is passed in neither reg nor stack, this field holds a number
- of a special slot to be used. */
- rtx special_slot;
- /* For pointer bounds hold an index of parm bounds are bound to. -1 if
- there is no such pointer. */
- int pointer_arg;
- /* If pointer_arg refers a structure, then pointer_offset holds an offset
- of a pointer in this structure. */
- int pointer_offset;
/* If REG was promoted from the actual mode of the argument expression,
indicates whether the promotion is sign- or zero-extended. */
int unsignedp;
@@ -2129,10 +2120,7 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
argpos < n_named_args);
if (args[i].reg && CONST_INT_P (args[i].reg))
- {
- args[i].special_slot = args[i].reg;
- args[i].reg = NULL;
- }
+ args[i].reg = NULL;
/* If this is a sibling call and the machine has register windows, the
register window has to be unwinded before calling the routine, so
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 75d4cec0ba8..2f6daa75a24 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -690,9 +690,6 @@ struct GTY(()) cgraph_thunk_info {
the virtual one. */
bool virtual_offset_p;
- /* ??? True for special kind of thunks, seems related to instrumentation. */
- bool add_pointer_bounds_args;
-
/* Set to true when alias node (the cgraph_node to which this struct belong)
is a thunk. Access to any other fields is invalid if this is false. */
bool thunk_p;
@@ -1939,10 +1936,6 @@ public:
/* Set when variable is scheduled to be assembled. */
unsigned output : 1;
- /* Set when variable has statically initialized pointer
- or is a static bounds variable and needs initalization. */
- unsigned need_bounds_init : 1;
-
/* Set if the variable is dynamically initialized, except for
function local statics. */
unsigned dynamically_initialized : 1;
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 162e0049b6b..8bfbd0bb12f 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1782,11 +1782,6 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)
tree thunk_fndecl = decl;
tree a;
- /* Instrumentation thunk is the same function with
- a different signature. Never need to expand it. */
- if (thunk.add_pointer_bounds_args)
- return false;
-
if (!force_gimple_thunk
&& this_adjusting
&& indirect_offset == 0
@@ -2123,8 +2118,7 @@ cgraph_node::assemble_thunks_and_aliases (void)
for (e = callers; e;)
if (e->caller->thunk.thunk_p
- && !e->caller->global.inlined_to
- && !e->caller->thunk.add_pointer_bounds_args)
+ && !e->caller->global.inlined_to)
{
cgraph_node *thunk = e->caller;
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 12bc7926f86..fd05873ba39 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -8324,8 +8324,6 @@ ix86_function_arg_advance (cumulative_args_t cum_v, machine_mode mode,
else
nregs = function_arg_advance_32 (cum, mode, type, bytes, words);
- /* For pointers passed in memory we expect bounds passed in Bounds
- Table. */
if (!nregs)
{
/* Track if there are outgoing arguments on stack. */
@@ -30421,8 +30419,6 @@ struct builtin_isa {
enum ix86_builtin_func_type tcode; /* type to use in the declaration */
unsigned char const_p:1; /* true if the declaration is constant */
unsigned char pure_p:1; /* true if the declaration has pure attribute */
- bool leaf_p; /* true if the declaration has leaf attribute */
- bool nothrow_p; /* true if the declaration has nothrow attribute */
bool set_and_not_built_p;
};
@@ -30493,8 +30489,6 @@ def_builtin (HOST_WIDE_INT mask, HOST_WIDE_INT mask2,
ix86_builtins[(int) code] = NULL_TREE;
ix86_builtins_isa[(int) code].tcode = tcode;
ix86_builtins_isa[(int) code].name = name;
- ix86_builtins_isa[(int) code].leaf_p = false;
- ix86_builtins_isa[(int) code].nothrow_p = false;
ix86_builtins_isa[(int) code].const_p = false;
ix86_builtins_isa[(int) code].pure_p = false;
ix86_builtins_isa[(int) code].set_and_not_built_p = true;
@@ -30574,13 +30568,6 @@ ix86_add_new_builtins (HOST_WIDE_INT isa, HOST_WIDE_INT isa2)
ix86_builtins[i] = decl;
if (ix86_builtins_isa[i].const_p)
TREE_READONLY (decl) = 1;
- if (ix86_builtins_isa[i].pure_p)
- DECL_PURE_P (decl) = 1;
- if (ix86_builtins_isa[i].leaf_p)
- DECL_ATTRIBUTES (decl) = build_tree_list (get_identifier ("leaf"),
- NULL_TREE);
- if (ix86_builtins_isa[i].nothrow_p)
- TREE_NOTHROW (decl) = 1;
}
}
diff --git a/gcc/ipa-fnsummary.c b/gcc/ipa-fnsummary.c
index 057b364b379..260315da228 100644
--- a/gcc/ipa-fnsummary.c
+++ b/gcc/ipa-fnsummary.c
@@ -2449,13 +2449,7 @@ compute_fn_summary (struct cgraph_node *node, bool early)
info->account_size_time (2 * ipa_fn_summary::size_scale, 0, t, t);
ipa_update_overall_fn_summary (node);
info->self_size = info->size;
- /* We cannot inline instrumentation clones. */
- if (node->thunk.add_pointer_bounds_args)
- {
- info->inlinable = false;
- node->callees->inline_failed = CIF_CHKP;
- }
- else if (stdarg_p (TREE_TYPE (node->decl)))
+ if (stdarg_p (TREE_TYPE (node->decl)))
{
info->inlinable = false;
node->callees->inline_failed = CIF_VARIADIC_THUNK;
@@ -2501,16 +2495,6 @@ compute_fn_summary (struct cgraph_node *node, bool early)
node->local.can_change_signature = !e;
}
}
- /* Functions called by instrumentation thunk can't change signature
- because instrumentation thunk modification is not supported. */
- if (node->local.can_change_signature)
- for (e = node->callers; e; e = e->next_caller)
- if (e->caller->thunk.thunk_p
- && e->caller->thunk.add_pointer_bounds_args)
- {
- node->local.can_change_signature = false;
- break;
- }
analyze_function_body (node, early);
pop_cfun ();
}
diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index 849e9b4e9f5..e4c9dda0df1 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -548,9 +548,6 @@ sem_function::equals_wpa (sem_item *item,
return return_false_with_msg ("thunk this_adjusting mismatch");
if (cnode->thunk.virtual_offset_p != cnode2->thunk.virtual_offset_p)
return return_false_with_msg ("thunk virtual_offset_p mismatch");
- if (cnode->thunk.add_pointer_bounds_args
- != cnode2->thunk.add_pointer_bounds_args)
- return return_false_with_msg ("thunk add_pointer_bounds_args mismatch");
}
/* Compare special function DECL attributes. */
@@ -1407,7 +1404,6 @@ sem_function::init (void)
hstate.add_hwi (cnode->thunk.virtual_value);
hstate.add_flag (cnode->thunk.this_adjusting);
hstate.add_flag (cnode->thunk.virtual_offset_p);
- hstate.add_flag (cnode->thunk.add_pointer_bounds_args);
gcode_hash = hstate.end ();
}
}
@@ -2205,7 +2201,6 @@ sem_variable::merge (sem_item *alias_item)
DECL_INITIAL (alias->decl) = NULL;
((symtab_node *)alias)->call_for_symbol_and_aliases (clear_decl_rtl,
NULL, true);
- alias->need_bounds_init = false;
alias->remove_all_references ();
if (TREE_ADDRESSABLE (alias->decl))
original->call_for_symbol_and_aliases (set_addressable, NULL, true);
diff --git a/gcc/ipa-visibility.c b/gcc/ipa-visibility.c
index d9ef8f53735..84585b52e46 100644
--- a/gcc/ipa-visibility.c
+++ b/gcc/ipa-visibility.c
@@ -721,7 +721,6 @@ function_and_variable_visibility (bool whole_program)
localize_node (whole_program, node);
if (node->thunk.thunk_p
- && !node->thunk.add_pointer_bounds_args
&& TREE_PUBLIC (node->decl))
{
struct cgraph_node *decl_node = node;
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 26268bc0c7c..2496694124c 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -548,12 +548,6 @@ symbol_table::remove_unreachable_nodes (FILE *file)
node->remove_callees ();
node->remove_all_references ();
changed = true;
- if (node->thunk.thunk_p
- && node->thunk.add_pointer_bounds_args)
- {
- node->thunk.thunk_p = false;
- node->thunk.add_pointer_bounds_args = false;
- }
}
}
else
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c
index b941c76a878..4dfa2862be3 100644
--- a/gcc/lto-cgraph.c
+++ b/gcc/lto-cgraph.c
@@ -556,8 +556,7 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node,
streamer_write_uhwi_stream
(ob->main_stream,
1 + (node->thunk.this_adjusting != 0) * 2
- + (node->thunk.virtual_offset_p != 0) * 4
- + (node->thunk.add_pointer_bounds_args != 0) * 8);
+ + (node->thunk.virtual_offset_p != 0) * 4);
streamer_write_uhwi_stream (ob->main_stream, node->thunk.fixed_offset);
streamer_write_uhwi_stream (ob->main_stream, node->thunk.virtual_value);
streamer_write_uhwi_stream (ob->main_stream, node->thunk.indirect_offset);
@@ -631,7 +630,6 @@ lto_output_varpool_node (struct lto_simple_output_block *ob, varpool_node *node,
bp_pack_value (&bp, node->tls_model, 3);
bp_pack_value (&bp, node->used_by_single_function, 1);
bp_pack_value (&bp, node->dynamically_initialized, 1);
- bp_pack_value (&bp, node->need_bounds_init, 1);
streamer_write_bitpack (&bp);
group = node->get_comdat_group ();
@@ -1311,7 +1309,6 @@ input_node (struct lto_file_decl_data *file_data,
node->thunk.indirect_offset = indirect_offset;
node->thunk.this_adjusting = (type & 2);
node->thunk.virtual_offset_p = (type & 4);
- node->thunk.add_pointer_bounds_args = (type & 8);
}
if (node->alias && !node->analyzed && node->weakref)
node->alias_target = get_alias_symbol (node->decl);
@@ -1382,7 +1379,6 @@ input_varpool_node (struct lto_file_decl_data *file_data,
node->tls_model = (enum tls_model)bp_unpack_value (&bp, 3);
node->used_by_single_function = (enum tls_model)bp_unpack_value (&bp, 1);
node->dynamically_initialized = bp_unpack_value (&bp, 1);
- node->need_bounds_init = bp_unpack_value (&bp, 1);
group = read_identifier (ib);
if (group)
{
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index b26c883b732..a72016a4843 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -2412,8 +2412,7 @@ lto_output (void)
if (cgraph_node *node = dyn_cast <cgraph_node *> (snode))
{
if (lto_symtab_encoder_encode_body_p (encoder, node)
- && !node->alias
- && (!node->thunk.thunk_p || !node->thunk.add_pointer_bounds_args))
+ && !node->alias)
{
if (flag_checking)
{
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 5c0c4c5ab91..98cfbe31b82 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -4554,7 +4554,6 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id)
/* We will be inlining this callee. */
id->eh_lp_nr = lookup_stmt_eh_lp (stmt);
- id->assign_stmts.create (0);
/* Update the callers EH personality. */
if (DECL_FUNCTION_PERSONALITY (fn))
@@ -4916,7 +4915,6 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id)
TREE_USED (gimple_assign_rhs1 (stmt)) = 1;
}
- id->assign_stmts.release ();
id->add_clobbers_to_eh_landing_pads = 0;
/* Output the inlining info for this abstract function, since it has been
diff --git a/gcc/tree-inline.h b/gcc/tree-inline.h
index 11f596e3a74..9c2915edc6c 100644
--- a/gcc/tree-inline.h
+++ b/gcc/tree-inline.h
@@ -63,9 +63,6 @@ struct copy_body_data
/* The VAR_DECL for the return value. */
tree retvar;
- /* Assign statements that need bounds copy. */
- vec<gimple *> assign_stmts;
-
/* The map from local declarations in the inlined function to
equivalents in the function into which it is being inlined. */
hash_map<tree, tree> *decl_map;
diff --git a/gcc/varpool.c b/gcc/varpool.c
index edffa551ee6..8e5a9372656 100644
--- a/gcc/varpool.c
+++ b/gcc/varpool.c
@@ -226,8 +226,6 @@ varpool_node::dump (FILE *f)
fprintf (f, " output");
if (used_by_single_function)
fprintf (f, " used-by-single-function");
- if (need_bounds_init)
- fprintf (f, " need-bounds-init");
if (TREE_READONLY (decl))
fprintf (f, " read-only");
if (ctor_useable_for_folding_p ())