summaryrefslogtreecommitdiff
path: root/gcc/profile.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-04 12:08:43 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-04 12:08:43 +0000
commit2f0bfe723222329a297d650fc825ceb2450406e7 (patch)
tree52edd2af4071bdd3a36e9e4326fda3898b0340fc /gcc/profile.c
parent4dfe8b745ff717c66fab3bc5d759a1d862ddd074 (diff)
downloadgcc-2f0bfe723222329a297d650fc825ceb2450406e7.tar.gz
* loop.c (try_copy_prop); Kill invalidated REG_EQUAL notes.
* reload1.c (fixup_abnormal_edges): New static function. (reload): Use it. * flow.c (need_fake_edge_p): New function. (flow_call_edges_add): Fix handling of noreturn and sibbling calls; avoid call insn to be very last insn in the insn stream. * profile.c (branch_prob): Call flow_call_edges_add instead of doing that by hand; cleanup cfg to re-merge basic blocks once we are done. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44635 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/profile.c')
-rw-r--r--gcc/profile.c30
1 files changed, 8 insertions, 22 deletions
diff --git a/gcc/profile.c b/gcc/profile.c
index ddb621a6d19..1335e9cd593 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -528,6 +528,8 @@ branch_prob ()
total_num_times_called++;
+ flow_call_edges_add (NULL);
+
/* We can't handle cyclic regions constructed using abnormal edges.
To avoid these we replace every source of abnormal edge by a fake
edge from entry node and every destination by fake edge to exit.
@@ -562,28 +564,6 @@ branch_prob ()
have_entry_edge = 1;
}
- /* ??? Not strictly needed unless flag_test_coverage, but adding
- them anyway keeps the .da file consistent. */
- /* ??? Currently inexact for basic blocks with multiple calls.
- We need to split blocks here. */
- for (insn = bb->head;
- insn != NEXT_INSN (bb->end);
- insn = NEXT_INSN (insn))
- {
- rtx set;
- if (GET_CODE (insn) == CALL_INSN && !CONST_CALL_P (insn))
- need_exit_edge = 1;
- else if (GET_CODE (insn) == INSN)
- {
- set = PATTERN (insn);
- if (GET_CODE (set) == PARALLEL)
- set = XVECEXP (set, 0, 0);
- if ((GET_CODE (set) == ASM_OPERANDS && MEM_VOLATILE_P (set))
- || GET_CODE (set) == ASM_INPUT)
- need_exit_edge = 1;
- }
- }
-
if (need_exit_edge && !have_exit_edge)
{
if (rtl_dump_file)
@@ -787,6 +767,12 @@ branch_prob ()
}
remove_fake_edges ();
+ /* Re-merge split basic blocks and the mess introduced by
+ insert_insn_on_edge. */
+ cleanup_cfg (profile_arc_flag ? CLEANUP_EXPENSIVE : 0);
+ if (rtl_dump_file)
+ dump_flow_info (rtl_dump_file);
+
free (edge_infos);
free_edge_list (el);
}