re PR other/37419 (mpfr related memory corruption)
PR other/37419 * ipa-prop.h (ipa_propagate_indirect_call_infos): Change last argument to pointer to vector pointer. * ipa-prop.c (ipa_propagate_indirect_call_infos, propagate_info_to_inlined_callees): Likewise. (update_call_notes_after_inlining): Likewise. Push new indirect edge to *new_edges instead of new_edges. Reread IPA_EDGE_REF after ipa_check_create_edge_args. * ipa-inline.c (cgraph_decide_recursive_inlining): Change last argument to pointer to vector pointer. (cgraph_decide_inlining_of_small_function): Adjust cgraph_decide_recursive_inlining and ipa_propagate_indirect_call_infos calls. From-SVN: r140168
This commit is contained in:
parent
71aaa2ff33
commit
e56f5f3e5a
@ -1,5 +1,19 @@
|
||||
2008-09-09 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR other/37419
|
||||
* ipa-prop.h (ipa_propagate_indirect_call_infos): Change last argument
|
||||
to pointer to vector pointer.
|
||||
* ipa-prop.c (ipa_propagate_indirect_call_infos,
|
||||
propagate_info_to_inlined_callees): Likewise.
|
||||
(update_call_notes_after_inlining): Likewise. Push new indirect edge
|
||||
to *new_edges instead of new_edges. Reread IPA_EDGE_REF after
|
||||
ipa_check_create_edge_args.
|
||||
* ipa-inline.c (cgraph_decide_recursive_inlining): Change last argument
|
||||
to pointer to vector pointer.
|
||||
(cgraph_decide_inlining_of_small_function): Adjust
|
||||
cgraph_decide_recursive_inlining and ipa_propagate_indirect_call_infos
|
||||
calls.
|
||||
|
||||
PR target/37438
|
||||
* config/i386/i386.md (zero_extendqihi2_movzbl): Enable when optimizing
|
||||
for size, not speed.
|
||||
|
@ -646,11 +646,12 @@ lookup_recursive_calls (struct cgraph_node *node, struct cgraph_node *where,
|
||||
|
||||
/* Decide on recursive inlining: in the case function has recursive calls,
|
||||
inline until body size reaches given argument. If any new indirect edges
|
||||
are discovered in the process, add them to NEW_EDGES, unless it is NULL. */
|
||||
are discovered in the process, add them to *NEW_EDGES, unless NEW_EDGES
|
||||
is NULL. */
|
||||
|
||||
static bool
|
||||
cgraph_decide_recursive_inlining (struct cgraph_node *node,
|
||||
VEC (cgraph_edge_p, heap) *new_edges)
|
||||
VEC (cgraph_edge_p, heap) **new_edges)
|
||||
{
|
||||
int limit = PARAM_VALUE (PARAM_MAX_INLINE_INSNS_RECURSIVE_AUTO);
|
||||
int max_depth = PARAM_VALUE (PARAM_MAX_INLINE_RECURSIVE_DEPTH_AUTO);
|
||||
@ -980,7 +981,9 @@ cgraph_decide_inlining_of_small_functions (void)
|
||||
where = edge->caller;
|
||||
if (where->global.inlined_to)
|
||||
where = where->global.inlined_to;
|
||||
if (!cgraph_decide_recursive_inlining (where, new_indirect_edges))
|
||||
if (!cgraph_decide_recursive_inlining (where,
|
||||
flag_indirect_inlining
|
||||
? &new_indirect_edges : NULL))
|
||||
continue;
|
||||
if (flag_indirect_inlining)
|
||||
add_new_edges_to_heap (heap, new_indirect_edges);
|
||||
@ -1002,7 +1005,7 @@ cgraph_decide_inlining_of_small_functions (void)
|
||||
cgraph_mark_inline_edge (edge, true);
|
||||
if (flag_indirect_inlining)
|
||||
{
|
||||
ipa_propagate_indirect_call_infos (edge, new_indirect_edges);
|
||||
ipa_propagate_indirect_call_infos (edge, &new_indirect_edges);
|
||||
add_new_edges_to_heap (heap, new_indirect_edges);
|
||||
}
|
||||
update_callee_keys (heap, callee, updated_nodes);
|
||||
|
@ -890,12 +890,12 @@ print_edge_addition_message (FILE *f, struct ipa_param_call_note *nt,
|
||||
/* Update the param called notes associated with NODE when CS is being inlined,
|
||||
assuming NODE is (potentially indirectly) inlined into CS->callee.
|
||||
Moreover, if the callee is discovered to be constant, create a new cgraph
|
||||
edge for it. Newly discovered indirect edges will be added to NEW_EDGES,
|
||||
unless it is NULL. */
|
||||
edge for it. Newly discovered indirect edges will be added to *NEW_EDGES,
|
||||
unless NEW_EDGES is NULL. */
|
||||
static void
|
||||
update_call_notes_after_inlining (struct cgraph_edge *cs,
|
||||
struct cgraph_node *node,
|
||||
VEC (cgraph_edge_p, heap) *new_edges)
|
||||
VEC (cgraph_edge_p, heap) **new_edges)
|
||||
{
|
||||
struct ipa_node_params *info = IPA_NODE_REF (node);
|
||||
struct ipa_edge_args *top = IPA_EDGE_REF (cs);
|
||||
@ -949,7 +949,8 @@ update_call_notes_after_inlining (struct cgraph_edge *cs,
|
||||
new_indirect_edge->indirect_call = 1;
|
||||
ipa_check_create_edge_args ();
|
||||
if (new_edges)
|
||||
VEC_safe_push (cgraph_edge_p, heap, new_edges, new_indirect_edge);
|
||||
VEC_safe_push (cgraph_edge_p, heap, *new_edges, new_indirect_edge);
|
||||
top = IPA_EDGE_REF (cs);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -959,11 +960,11 @@ update_call_notes_after_inlining (struct cgraph_edge *cs,
|
||||
update_call_notes_after_inlining on all nodes and
|
||||
update_jump_functions_after_inlining on all non-inlined edges that lead out
|
||||
of this subtree. Newly discovered indirect edges will be added to
|
||||
NEW_EDGES, unless it is NULL. */
|
||||
*NEW_EDGES, unless NEW_EDGES is NULL. */
|
||||
static void
|
||||
propagate_info_to_inlined_callees (struct cgraph_edge *cs,
|
||||
struct cgraph_node *node,
|
||||
VEC (cgraph_edge_p, heap) *new_edges)
|
||||
VEC (cgraph_edge_p, heap) **new_edges)
|
||||
{
|
||||
struct cgraph_edge *e;
|
||||
|
||||
@ -979,10 +980,10 @@ propagate_info_to_inlined_callees (struct cgraph_edge *cs,
|
||||
/* Update jump functions and call note functions on inlining the call site CS.
|
||||
CS is expected to lead to a node already cloned by
|
||||
cgraph_clone_inline_nodes. Newly discovered indirect edges will be added to
|
||||
NEW_EDGES, unless it is NULL. */
|
||||
*NEW_EDGES, unless NEW_EDGES is NULL. */
|
||||
void
|
||||
ipa_propagate_indirect_call_infos (struct cgraph_edge *cs,
|
||||
VEC (cgraph_edge_p, heap) *new_edges)
|
||||
VEC (cgraph_edge_p, heap) **new_edges)
|
||||
{
|
||||
propagate_info_to_inlined_callees (cs, cs->callee, new_edges);
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ void ipa_create_param_decls_array (struct cgraph_node *);
|
||||
void ipa_detect_param_modifications (struct cgraph_node *);
|
||||
void ipa_analyze_params_uses (struct cgraph_node *);
|
||||
void ipa_propagate_indirect_call_infos (struct cgraph_edge *cs,
|
||||
VEC (cgraph_edge_p, heap) *new_edges);
|
||||
VEC (cgraph_edge_p, heap) **new_edges);
|
||||
|
||||
/* Debugging interface. */
|
||||
void ipa_print_node_params (FILE *, struct cgraph_node *node);
|
||||
|
Loading…
x
Reference in New Issue
Block a user