diff options
author | Martin Jambor <mjambor@suse.cz> | 2019-11-07 11:55:43 +0100 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2019-11-07 11:55:43 +0100 |
commit | 7313607478c11e9455a32fb0dbfd7867e04ea96a (patch) | |
tree | 9d440c3b3504f391067881779bf98569f28ecf21 /gcc/value-prof.c | |
parent | 0775830a79bad1cdaa8fe279da7cbed123f696b6 (diff) | |
download | gcc-7313607478c11e9455a32fb0dbfd7867e04ea96a.zip gcc-7313607478c11e9455a32fb0dbfd7867e04ea96a.tar.gz gcc-7313607478c11e9455a32fb0dbfd7867e04ea96a.tar.bz2 |
Remove gimple_call_types_likely_match_p (PR 70929)
2019-11-07 Martin Jambor <mjambor@suse.cz>
PR lto/70929
* cif-code.def (MISMATCHED_ARGUMENTS): Removed.
* cgraph.h (gimple_check_call_matching_types): Remove
* cgraph.c (gimple_check_call_args): Likewise.
(gimple_check_call_matching_types): Likewise.
(symbol_table::create_edge): Do not call
gimple_check_call_matching_types.
(cgraph_edge::make_direct): Likewise.
(cgraph_edge::redirect_call_stmt_to_callee): Likewise.
* value-prof.h (check_ic_target): Remove.
* value-prof.c (check_ic_target): Remove.
(gimple_ic_transform): Do nat call check_ic_target.
* auto-profile.c (function_instance::find_icall_target_map): Likewise.
(afdo_indirect_call): Likewise.
* ipa-prop.c (update_indirect_edges_after_inlining): Do not call
gimple_check_call_matching_types.
* ipa-inline.c (early_inliner): Likewise.
testsuite/
* g++.dg/lto/pr70929_[01].C: New test.
* gcc.dg/winline-10.c: Adjust for the fact that inlining happens.
From-SVN: r277920
Diffstat (limited to 'gcc/value-prof.c')
-rw-r--r-- | gcc/value-prof.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/gcc/value-prof.c b/gcc/value-prof.c index 55ea097..789309c 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -1245,25 +1245,6 @@ find_func_by_profile_id (int profile_id) return NULL; } -/* Perform sanity check on the indirect call target. Due to race conditions, - false function target may be attributed to an indirect call site. If the - call expression type mismatches with the target function's type, expand_call - may ICE. Here we only do very minimal sanity check just to make compiler happy. - Returns true if TARGET is considered ok for call CALL_STMT. */ - -bool -check_ic_target (gcall *call_stmt, struct cgraph_node *target) -{ - if (gimple_check_call_matching_types (call_stmt, target->decl, true)) - return true; - - if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, call_stmt, - "Skipping target %s with mismatching types for icall\n", - target->name ()); - return false; -} - /* Do transformation if (actual_callee_address == address_of_most_common_function/method) @@ -1456,17 +1437,6 @@ gimple_ic_transform (gimple_stmt_iterator *gsi) return false; } - if (!check_ic_target (stmt, direct_call)) - { - if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, stmt, - "Indirect call -> direct call %T => %T " - "transformation skipped because of type mismatch: %G", - gimple_call_fn (stmt), direct_call->decl, stmt); - gimple_remove_histogram_value (cfun, stmt, histogram); - return false; - } - if (dump_enabled_p ()) { dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, stmt, |