diff options
author | marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-27 09:24:45 +0000 |
---|---|---|
committer | marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-27 09:24:45 +0000 |
commit | 4c8041d7f70d0d301fecb802578cf441c043ece6 (patch) | |
tree | f1d34832a1df36dc5fc05332f91ff4a37dce3c77 /gcc/ipa-prop.c | |
parent | ec00a242b6889a0bb4949f26c5e2a63b50f13315 (diff) | |
download | gcc-4c8041d7f70d0d301fecb802578cf441c043ece6.tar.gz |
Fix for devirtualization dump functions
* gimple.h (gimple_location_safe): New function introduced.
* cgraphunit.c (walk_polymorphic_call_targets): Usage
of gimple_location_safe replaces gimple_location.
(gimple_fold_call): Likewise.
* ipa-devirt.c (ipa_devirt): Likewise.
* ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
* ipa.c (walk_polymorphic_call_targets): Likewise.
* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212067 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 1e10b53b00f..68efc77851c 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -2673,17 +2673,11 @@ ipa_make_edge_direct_to_target (struct cgraph_edge *ie, tree target) if (dump_enabled_p ()) { - const char *fmt = "discovered direct call to non-function in %s/%i, " - "making it __builtin_unreachable\n"; - - if (ie->call_stmt) - { - location_t loc = gimple_location (ie->call_stmt); - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc, fmt, - ie->caller->name (), ie->caller->order); - } - else if (dump_file) - fprintf (dump_file, fmt, ie->caller->name (), ie->caller->order); + location_t loc = gimple_location_safe (ie->call_stmt); + dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc, + "discovered direct call to non-function in %s/%i, " + "making it __builtin_unreachable\n", + ie->caller->name (), ie->caller->order); } target = builtin_decl_implicit (BUILT_IN_UNREACHABLE); @@ -2745,18 +2739,11 @@ ipa_make_edge_direct_to_target (struct cgraph_edge *ie, tree target) } if (dump_enabled_p ()) { - const char *fmt = "converting indirect call in %s to direct call to %s\n"; - - if (ie->call_stmt) - { - location_t loc = gimple_location (ie->call_stmt); + location_t loc = gimple_location_safe (ie->call_stmt); - dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc, fmt, - ie->caller->name (), callee->name ()); - - } - else if (dump_file) - fprintf (dump_file, fmt, ie->caller->name (), callee->name ()); + dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc, + "converting indirect call in %s to direct call to %s\n", + ie->caller->name (), callee->name ()); } ie = cgraph_make_edge_direct (ie, callee); es = inline_edge_summary (ie); |