summaryrefslogtreecommitdiff
path: root/gcc/value-prof.c
diff options
context:
space:
mode:
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-20 23:01:12 +0000
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-20 23:01:12 +0000
commite1dfbe3090ccf6cfbc7275cfdfa38f71647de3ed (patch)
tree8c98991ecdce73acfe22e53e466031d83b2524c1 /gcc/value-prof.c
parent6f44b17da48973c9fe4f7b690879dd90bf8a8c90 (diff)
parent1b2bf75690af8115739ebba710a44d05388c7a1a (diff)
downloadgcc-e1dfbe3090ccf6cfbc7275cfdfa38f71647de3ed.tar.gz
Merge in trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@202802 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/value-prof.c')
-rw-r--r--gcc/value-prof.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/gcc/value-prof.c b/gcc/value-prof.c
index bda3030e46a..cb6a699131d 100644
--- a/gcc/value-prof.c
+++ b/gcc/value-prof.c
@@ -32,7 +32,7 @@ along with GCC; see the file COPYING3. If not see
#include "optabs.h"
#include "regs.h"
#include "ggc.h"
-#include "tree-flow.h"
+#include "tree-ssa.h"
#include "tree-flow-inline.h"
#include "diagnostic.h"
#include "gimple-pretty-print.h"
@@ -589,7 +589,7 @@ check_counter (gimple stmt, const char * name,
dump_printf_loc (MSG_MISSED_OPTIMIZATION, locus,
"correcting inconsistent value profile: %s "
"profiler overall count (%d) does not match BB "
- "count (%d)", name, (int)*all, (int)bb_count);
+ "count (%d)\n", name, (int)*all, (int)bb_count);
*all = bb_count;
if (*count > *all)
*count = *all;
@@ -1283,7 +1283,7 @@ check_ic_target (gimple call_stmt, struct cgraph_node *target)
locus = gimple_location (call_stmt);
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, locus,
- "Skipping target %s with mismatching types for icall ",
+ "Skipping target %s with mismatching types for icall\n",
cgraph_node_name (target));
return false;
}
@@ -1307,6 +1307,9 @@ gimple_ic (gimple icall_stmt, struct cgraph_node *direct_call,
edge e_cd, e_ci, e_di, e_dj = NULL, e_ij;
gimple_stmt_iterator gsi;
int lp_nr, dflags;
+ edge e_eh, e;
+ edge_iterator ei;
+ gimple_stmt_iterator psi;
cond_bb = gimple_bb (icall_stmt);
gsi = gsi_for_stmt (icall_stmt);
@@ -1409,24 +1412,21 @@ gimple_ic (gimple icall_stmt, struct cgraph_node *direct_call,
lp_nr = lookup_stmt_eh_lp (icall_stmt);
if (lp_nr > 0 && stmt_could_throw_p (dcall_stmt))
{
- edge e_eh, e;
- edge_iterator ei;
- gimple_stmt_iterator psi;
-
add_stmt_to_eh_lp (dcall_stmt, lp_nr);
- FOR_EACH_EDGE (e_eh, ei, icall_bb->succs)
- if (e_eh->flags & EDGE_EH)
- break;
- e = make_edge (dcall_bb, e_eh->dest, EDGE_EH);
- for (psi = gsi_start_phis (e_eh->dest);
- !gsi_end_p (psi); gsi_next (&psi))
- {
- gimple phi = gsi_stmt (psi);
- SET_USE (PHI_ARG_DEF_PTR_FROM_EDGE (phi, e),
- PHI_ARG_DEF_FROM_EDGE (phi, e_eh));
- }
}
+ FOR_EACH_EDGE (e_eh, ei, icall_bb->succs)
+ if (e_eh->flags & (EDGE_EH | EDGE_ABNORMAL))
+ {
+ e = make_edge (dcall_bb, e_eh->dest, e_eh->flags);
+ for (psi = gsi_start_phis (e_eh->dest);
+ !gsi_end_p (psi); gsi_next (&psi))
+ {
+ gimple phi = gsi_stmt (psi);
+ SET_USE (PHI_ARG_DEF_PTR_FROM_EDGE (phi, e),
+ PHI_ARG_DEF_FROM_EDGE (phi, e_eh));
+ }
+ }
return dcall_stmt;
}