diff options
author | Xinliang David Li <davidxl@google.com> | 2014-05-20 20:12:22 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@gcc.gnu.org> | 2014-05-20 20:12:22 +0000 |
commit | 2b5f08952775ead634c0020b2dcf9523414c8752 (patch) | |
tree | 01587269ffd956843f503c973e2d46f9e33e8016 /gcc/tree-ssa-pre.c | |
parent | 9c5f620306f1a53d0d0c5d75e77bd9c6af1e6cd1 (diff) | |
download | gcc-2b5f08952775ead634c0020b2dcf9523414c8752.zip gcc-2b5f08952775ead634c0020b2dcf9523414c8752.tar.gz gcc-2b5f08952775ead634c0020b2dcf9523414c8752.tar.bz2 |
add dbgcnt support for devirt
From-SVN: r210657
Diffstat (limited to 'gcc/tree-ssa-pre.c')
-rw-r--r-- | gcc/tree-ssa-pre.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 2929d4d..f497f90 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -4365,18 +4365,19 @@ eliminate_dom_walker::before_dom_children (basic_block b) continue; if (gimple_call_addr_fndecl (fn) != NULL_TREE && useless_type_conversion_p (TREE_TYPE (orig_fn), - TREE_TYPE (fn))) + TREE_TYPE (fn)) + && dbg_cnt (devirt)) { bool can_make_abnormal_goto = stmt_can_make_abnormal_goto (stmt); bool was_noreturn = gimple_call_noreturn_p (stmt); - if (dump_file && (dump_flags & TDF_DETAILS)) + if (dump_enabled_p ()) { - fprintf (dump_file, "Replacing call target with "); - print_generic_expr (dump_file, fn, 0); - fprintf (dump_file, " in "); - print_gimple_stmt (dump_file, stmt, 0, 0); + location_t loc = gimple_location (stmt); + dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc, + "converting indirect call to function %s\n", + cgraph_get_node (gimple_call_addr_fndecl (fn))->name ()); } gimple_call_set_fn (stmt, fn); |