* varasm.c (default_assemble_integer): Return false for values wider
[official-gcc.git] / gcc / cfgbuild.c
blob453e65cf49537e0ae162fe61ba3ee51fdcd815b8
1 /* Control flow graph building code for GNU compiler.
2 Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
3 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING. If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA. */
22 /* find_basic_blocks divides the current function's rtl into basic
23 blocks and constructs the CFG. The blocks are recorded in the
24 basic_block_info array; the CFG exists in the edge structures
25 referenced by the blocks.
27 find_basic_blocks also finds any unreachable loops and deletes them.
29 Available functionality:
30 - CFG construction
31 find_basic_blocks
32 - Local CFG construction
33 find_sub_basic_blocks */
35 #include "config.h"
36 #include "system.h"
37 #include "coretypes.h"
38 #include "tm.h"
39 #include "tree.h"
40 #include "rtl.h"
41 #include "hard-reg-set.h"
42 #include "basic-block.h"
43 #include "regs.h"
44 #include "flags.h"
45 #include "output.h"
46 #include "function.h"
47 #include "except.h"
48 #include "toplev.h"
49 #include "timevar.h"
51 static int count_basic_blocks (rtx);
52 static void find_basic_blocks_1 (rtx);
53 static void make_edges (basic_block, basic_block, int);
54 static void make_label_edge (sbitmap *, basic_block, rtx, int);
55 static void find_bb_boundaries (basic_block);
56 static void compute_outgoing_frequencies (basic_block);
58 /* Return true if insn is something that should be contained inside basic
59 block. */
61 bool
62 inside_basic_block_p (rtx insn)
64 switch (GET_CODE (insn))
66 case CODE_LABEL:
67 /* Avoid creating of basic block for jumptables. */
68 return (NEXT_INSN (insn) == 0
69 || !JUMP_P (NEXT_INSN (insn))
70 || (GET_CODE (PATTERN (NEXT_INSN (insn))) != ADDR_VEC
71 && GET_CODE (PATTERN (NEXT_INSN (insn))) != ADDR_DIFF_VEC));
73 case JUMP_INSN:
74 return (GET_CODE (PATTERN (insn)) != ADDR_VEC
75 && GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC);
77 case CALL_INSN:
78 case INSN:
79 return true;
81 case BARRIER:
82 case NOTE:
83 return false;
85 default:
86 gcc_unreachable ();
90 /* Return true if INSN may cause control flow transfer, so it should be last in
91 the basic block. */
93 bool
94 control_flow_insn_p (rtx insn)
96 rtx note;
98 switch (GET_CODE (insn))
100 case NOTE:
101 case CODE_LABEL:
102 return false;
104 case JUMP_INSN:
105 /* Jump insn always causes control transfer except for tablejumps. */
106 return (GET_CODE (PATTERN (insn)) != ADDR_VEC
107 && GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC);
109 case CALL_INSN:
110 /* Noreturn and sibling call instructions terminate the basic blocks
111 (but only if they happen unconditionally). */
112 if ((SIBLING_CALL_P (insn)
113 || find_reg_note (insn, REG_NORETURN, 0))
114 && GET_CODE (PATTERN (insn)) != COND_EXEC)
115 return true;
116 /* Call insn may return to the nonlocal goto handler. */
117 return ((nonlocal_goto_handler_labels
118 && (0 == (note = find_reg_note (insn, REG_EH_REGION,
119 NULL_RTX))
120 || INTVAL (XEXP (note, 0)) >= 0))
121 /* Or may trap. */
122 || can_throw_internal (insn));
124 case INSN:
125 return (flag_non_call_exceptions && can_throw_internal (insn));
127 case BARRIER:
128 /* It is nonsense to reach barrier when looking for the
129 end of basic block, but before dead code is eliminated
130 this may happen. */
131 return false;
133 default:
134 gcc_unreachable ();
138 /* Count the basic blocks of the function. */
140 static int
141 count_basic_blocks (rtx f)
143 int count = 0;
144 bool saw_insn = false;
145 rtx insn;
147 for (insn = f; insn; insn = NEXT_INSN (insn))
149 /* Code labels and barriers causes current basic block to be
150 terminated at previous real insn. */
151 if ((LABEL_P (insn) || BARRIER_P (insn))
152 && saw_insn)
153 count++, saw_insn = false;
155 /* Start basic block if needed. */
156 if (!saw_insn && inside_basic_block_p (insn))
157 saw_insn = true;
159 /* Control flow insn causes current basic block to be terminated. */
160 if (saw_insn && control_flow_insn_p (insn))
161 count++, saw_insn = false;
164 if (saw_insn)
165 count++;
167 /* The rest of the compiler works a bit smoother when we don't have to
168 check for the edge case of do-nothing functions with no basic blocks. */
169 if (count == 0)
171 emit_insn (gen_rtx_USE (VOIDmode, const0_rtx));
172 count = 1;
175 return count;
178 /* Create an edge between two basic blocks. FLAGS are auxiliary information
179 about the edge that is accumulated between calls. */
181 /* Create an edge from a basic block to a label. */
183 static void
184 make_label_edge (sbitmap *edge_cache, basic_block src, rtx label, int flags)
186 gcc_assert (LABEL_P (label));
188 /* If the label was never emitted, this insn is junk, but avoid a
189 crash trying to refer to BLOCK_FOR_INSN (label). This can happen
190 as a result of a syntax error and a diagnostic has already been
191 printed. */
193 if (INSN_UID (label) == 0)
194 return;
196 cached_make_edge (edge_cache, src, BLOCK_FOR_INSN (label), flags);
199 /* Create the edges generated by INSN in REGION. */
201 void
202 rtl_make_eh_edge (sbitmap *edge_cache, basic_block src, rtx insn)
204 int is_call = CALL_P (insn) ? EDGE_ABNORMAL_CALL : 0;
205 rtx handlers, i;
207 handlers = reachable_handlers (insn);
209 for (i = handlers; i; i = XEXP (i, 1))
210 make_label_edge (edge_cache, src, XEXP (i, 0),
211 EDGE_ABNORMAL | EDGE_EH | is_call);
213 free_INSN_LIST_list (&handlers);
216 /* Identify the edges between basic blocks MIN to MAX.
218 NONLOCAL_LABEL_LIST is a list of non-local labels in the function. Blocks
219 that are otherwise unreachable may be reachable with a non-local goto.
221 BB_EH_END is an array indexed by basic block number in which we record
222 the list of exception regions active at the end of the basic block. */
224 static void
225 make_edges (basic_block min, basic_block max, int update_p)
227 basic_block bb;
228 sbitmap *edge_cache = NULL;
230 /* Assume no computed jump; revise as we create edges. */
231 current_function_has_computed_jump = 0;
233 /* If we are partitioning hot and cold basic blocks into separate
234 sections, we cannot assume there is no computed jump (partitioning
235 sometimes requires the use of indirect jumps; see comments about
236 partitioning at the top of bb-reorder.c:partition_hot_cold_basic_blocks
237 for complete details). */
239 if (flag_reorder_blocks_and_partition)
240 current_function_has_computed_jump = 1;
242 /* Heavy use of computed goto in machine-generated code can lead to
243 nearly fully-connected CFGs. In that case we spend a significant
244 amount of time searching the edge lists for duplicates. */
245 if (forced_labels || cfun->max_jumptable_ents > 100)
247 edge_cache = sbitmap_vector_alloc (last_basic_block, last_basic_block);
248 sbitmap_vector_zero (edge_cache, last_basic_block);
250 if (update_p)
251 FOR_BB_BETWEEN (bb, min, max->next_bb, next_bb)
253 edge e;
255 for (e = bb->succ; e ; e = e->succ_next)
256 if (e->dest != EXIT_BLOCK_PTR)
257 SET_BIT (edge_cache[bb->index], e->dest->index);
261 /* By nature of the way these get numbered, ENTRY_BLOCK_PTR->next_bb block
262 is always the entry. */
263 if (min == ENTRY_BLOCK_PTR->next_bb)
264 cached_make_edge (edge_cache, ENTRY_BLOCK_PTR, min,
265 EDGE_FALLTHRU);
267 FOR_BB_BETWEEN (bb, min, max->next_bb, next_bb)
269 rtx insn, x;
270 enum rtx_code code;
271 int force_fallthru = 0;
272 edge e;
274 if (LABEL_P (BB_HEAD (bb))
275 && LABEL_ALT_ENTRY_P (BB_HEAD (bb)))
276 cached_make_edge (NULL, ENTRY_BLOCK_PTR, bb, 0);
278 /* Examine the last instruction of the block, and discover the
279 ways we can leave the block. */
281 insn = BB_END (bb);
282 code = GET_CODE (insn);
284 /* A branch. */
285 if (code == JUMP_INSN)
287 rtx tmp;
289 /* Recognize exception handling placeholders. */
290 if (GET_CODE (PATTERN (insn)) == RESX)
291 rtl_make_eh_edge (edge_cache, bb, insn);
293 /* Recognize a non-local goto as a branch outside the
294 current function. */
295 else if (find_reg_note (insn, REG_NON_LOCAL_GOTO, NULL_RTX))
298 /* Recognize a tablejump and do the right thing. */
299 else if (tablejump_p (insn, NULL, &tmp))
301 rtvec vec;
302 int j;
304 if (GET_CODE (PATTERN (tmp)) == ADDR_VEC)
305 vec = XVEC (PATTERN (tmp), 0);
306 else
307 vec = XVEC (PATTERN (tmp), 1);
309 for (j = GET_NUM_ELEM (vec) - 1; j >= 0; --j)
310 make_label_edge (edge_cache, bb,
311 XEXP (RTVEC_ELT (vec, j), 0), 0);
313 /* Some targets (eg, ARM) emit a conditional jump that also
314 contains the out-of-range target. Scan for these and
315 add an edge if necessary. */
316 if ((tmp = single_set (insn)) != NULL
317 && SET_DEST (tmp) == pc_rtx
318 && GET_CODE (SET_SRC (tmp)) == IF_THEN_ELSE
319 && GET_CODE (XEXP (SET_SRC (tmp), 2)) == LABEL_REF)
320 make_label_edge (edge_cache, bb,
321 XEXP (XEXP (SET_SRC (tmp), 2), 0), 0);
323 #ifdef CASE_DROPS_THROUGH
324 /* Silly VAXen. The ADDR_VEC is going to be in the way of
325 us naturally detecting fallthru into the next block. */
326 force_fallthru = 1;
327 #endif
330 /* If this is a computed jump, then mark it as reaching
331 everything on the forced_labels list. */
332 else if (computed_jump_p (insn))
334 current_function_has_computed_jump = 1;
336 for (x = forced_labels; x; x = XEXP (x, 1))
337 make_label_edge (edge_cache, bb, XEXP (x, 0), EDGE_ABNORMAL);
340 /* Returns create an exit out. */
341 else if (returnjump_p (insn))
342 cached_make_edge (edge_cache, bb, EXIT_BLOCK_PTR, 0);
344 /* Otherwise, we have a plain conditional or unconditional jump. */
345 else
347 gcc_assert (JUMP_LABEL (insn));
348 make_label_edge (edge_cache, bb, JUMP_LABEL (insn), 0);
352 /* If this is a sibling call insn, then this is in effect a combined call
353 and return, and so we need an edge to the exit block. No need to
354 worry about EH edges, since we wouldn't have created the sibling call
355 in the first place. */
356 if (code == CALL_INSN && SIBLING_CALL_P (insn))
357 cached_make_edge (edge_cache, bb, EXIT_BLOCK_PTR,
358 EDGE_SIBCALL | EDGE_ABNORMAL);
360 /* If this is a CALL_INSN, then mark it as reaching the active EH
361 handler for this CALL_INSN. If we're handling non-call
362 exceptions then any insn can reach any of the active handlers.
363 Also mark the CALL_INSN as reaching any nonlocal goto handler. */
364 else if (code == CALL_INSN || flag_non_call_exceptions)
366 /* Add any appropriate EH edges. */
367 rtl_make_eh_edge (edge_cache, bb, insn);
369 if (code == CALL_INSN && nonlocal_goto_handler_labels)
371 /* ??? This could be made smarter: in some cases it's possible
372 to tell that certain calls will not do a nonlocal goto.
373 For example, if the nested functions that do the nonlocal
374 gotos do not have their addresses taken, then only calls to
375 those functions or to other nested functions that use them
376 could possibly do nonlocal gotos. */
378 /* We do know that a REG_EH_REGION note with a value less
379 than 0 is guaranteed not to perform a non-local goto. */
380 rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
382 if (!note || INTVAL (XEXP (note, 0)) >= 0)
383 for (x = nonlocal_goto_handler_labels; x; x = XEXP (x, 1))
384 make_label_edge (edge_cache, bb, XEXP (x, 0),
385 EDGE_ABNORMAL | EDGE_ABNORMAL_CALL);
389 /* Find out if we can drop through to the next block. */
390 insn = NEXT_INSN (insn);
391 for (e = bb->succ; e; e = e->succ_next)
392 if (e->dest == EXIT_BLOCK_PTR && e->flags & EDGE_FALLTHRU)
394 insn = 0;
395 break;
397 while (insn
398 && NOTE_P (insn)
399 && NOTE_LINE_NUMBER (insn) != NOTE_INSN_BASIC_BLOCK)
400 insn = NEXT_INSN (insn);
402 if (!insn || (bb->next_bb == EXIT_BLOCK_PTR && force_fallthru))
403 cached_make_edge (edge_cache, bb, EXIT_BLOCK_PTR, EDGE_FALLTHRU);
404 else if (bb->next_bb != EXIT_BLOCK_PTR)
406 if (force_fallthru || insn == BB_HEAD (bb->next_bb))
407 cached_make_edge (edge_cache, bb, bb->next_bb, EDGE_FALLTHRU);
411 if (edge_cache)
412 sbitmap_vector_free (edge_cache);
415 /* Find all basic blocks of the function whose first insn is F.
417 Collect and return a list of labels whose addresses are taken. This
418 will be used in make_edges for use with computed gotos. */
420 static void
421 find_basic_blocks_1 (rtx f)
423 rtx insn, next;
424 rtx bb_note = NULL_RTX;
425 rtx head = NULL_RTX;
426 rtx end = NULL_RTX;
427 basic_block prev = ENTRY_BLOCK_PTR;
429 /* We process the instructions in a slightly different way than we did
430 previously. This is so that we see a NOTE_BASIC_BLOCK after we have
431 closed out the previous block, so that it gets attached at the proper
432 place. Since this form should be equivalent to the previous,
433 count_basic_blocks continues to use the old form as a check. */
435 for (insn = f; insn; insn = next)
437 enum rtx_code code = GET_CODE (insn);
439 next = NEXT_INSN (insn);
441 if ((LABEL_P (insn) || BARRIER_P (insn))
442 && head)
444 prev = create_basic_block_structure (head, end, bb_note, prev);
445 head = end = NULL_RTX;
446 bb_note = NULL_RTX;
449 if (inside_basic_block_p (insn))
451 if (head == NULL_RTX)
452 head = insn;
453 end = insn;
456 if (head && control_flow_insn_p (insn))
458 prev = create_basic_block_structure (head, end, bb_note, prev);
459 head = end = NULL_RTX;
460 bb_note = NULL_RTX;
463 switch (code)
465 case NOTE:
467 int kind = NOTE_LINE_NUMBER (insn);
469 /* Look for basic block notes with which to keep the
470 basic_block_info pointers stable. Unthread the note now;
471 we'll put it back at the right place in create_basic_block.
472 Or not at all if we've already found a note in this block. */
473 if (kind == NOTE_INSN_BASIC_BLOCK)
475 if (bb_note == NULL_RTX)
476 bb_note = insn;
477 else
478 next = delete_insn (insn);
480 break;
483 case CODE_LABEL:
484 case JUMP_INSN:
485 case CALL_INSN:
486 case INSN:
487 case BARRIER:
488 break;
490 default:
491 gcc_unreachable ();
495 if (head != NULL_RTX)
496 create_basic_block_structure (head, end, bb_note, prev);
497 else if (bb_note)
498 delete_insn (bb_note);
500 gcc_assert (last_basic_block == n_basic_blocks);
502 clear_aux_for_blocks ();
506 /* Find basic blocks of the current function.
507 F is the first insn of the function and NREGS the number of register
508 numbers in use. */
510 void
511 find_basic_blocks (rtx f, int nregs ATTRIBUTE_UNUSED,
512 FILE *file ATTRIBUTE_UNUSED)
514 basic_block bb;
516 timevar_push (TV_CFG);
518 /* Flush out existing data. */
519 if (basic_block_info != NULL)
521 clear_edges ();
523 /* Clear bb->aux on all extant basic blocks. We'll use this as a
524 tag for reuse during create_basic_block, just in case some pass
525 copies around basic block notes improperly. */
526 FOR_EACH_BB (bb)
527 bb->aux = NULL;
529 basic_block_info = NULL;
532 n_basic_blocks = count_basic_blocks (f);
533 last_basic_block = 0;
534 ENTRY_BLOCK_PTR->next_bb = EXIT_BLOCK_PTR;
535 EXIT_BLOCK_PTR->prev_bb = ENTRY_BLOCK_PTR;
537 /* Size the basic block table. The actual structures will be allocated
538 by find_basic_blocks_1, since we want to keep the structure pointers
539 stable across calls to find_basic_blocks. */
540 /* ??? This whole issue would be much simpler if we called find_basic_blocks
541 exactly once, and thereafter we don't have a single long chain of
542 instructions at all until close to the end of compilation when we
543 actually lay them out. */
545 VARRAY_BB_INIT (basic_block_info, n_basic_blocks, "basic_block_info");
547 find_basic_blocks_1 (f);
549 profile_status = PROFILE_ABSENT;
551 /* Discover the edges of our cfg. */
552 make_edges (ENTRY_BLOCK_PTR->next_bb, EXIT_BLOCK_PTR->prev_bb, 0);
554 /* Do very simple cleanup now, for the benefit of code that runs between
555 here and cleanup_cfg, e.g. thread_prologue_and_epilogue_insns. */
556 tidy_fallthru_edges ();
558 #ifdef ENABLE_CHECKING
559 verify_flow_info ();
560 #endif
561 timevar_pop (TV_CFG);
564 /* State of basic block as seen by find_sub_basic_blocks. */
565 enum state {BLOCK_NEW = 0, BLOCK_ORIGINAL, BLOCK_TO_SPLIT};
567 #define STATE(BB) (enum state) ((size_t) (BB)->aux)
568 #define SET_STATE(BB, STATE) ((BB)->aux = (void *) (size_t) (STATE))
570 /* Scan basic block BB for possible BB boundaries inside the block
571 and create new basic blocks in the progress. */
573 static void
574 find_bb_boundaries (basic_block bb)
576 rtx insn = BB_HEAD (bb);
577 rtx end = BB_END (bb);
578 rtx flow_transfer_insn = NULL_RTX;
579 edge fallthru = NULL;
581 if (insn == BB_END (bb))
582 return;
584 if (LABEL_P (insn))
585 insn = NEXT_INSN (insn);
587 /* Scan insn chain and try to find new basic block boundaries. */
588 while (1)
590 enum rtx_code code = GET_CODE (insn);
592 /* On code label, split current basic block. */
593 if (code == CODE_LABEL)
595 fallthru = split_block (bb, PREV_INSN (insn));
596 if (flow_transfer_insn)
597 BB_END (bb) = flow_transfer_insn;
599 bb = fallthru->dest;
600 remove_edge (fallthru);
601 flow_transfer_insn = NULL_RTX;
602 if (LABEL_ALT_ENTRY_P (insn))
603 make_edge (ENTRY_BLOCK_PTR, bb, 0);
606 /* In case we've previously seen an insn that effects a control
607 flow transfer, split the block. */
608 if (flow_transfer_insn && inside_basic_block_p (insn))
610 fallthru = split_block (bb, PREV_INSN (insn));
611 BB_END (bb) = flow_transfer_insn;
612 bb = fallthru->dest;
613 remove_edge (fallthru);
614 flow_transfer_insn = NULL_RTX;
617 if (control_flow_insn_p (insn))
618 flow_transfer_insn = insn;
619 if (insn == end)
620 break;
621 insn = NEXT_INSN (insn);
624 /* In case expander replaced normal insn by sequence terminating by
625 return and barrier, or possibly other sequence not behaving like
626 ordinary jump, we need to take care and move basic block boundary. */
627 if (flow_transfer_insn)
628 BB_END (bb) = flow_transfer_insn;
630 /* We've possibly replaced the conditional jump by conditional jump
631 followed by cleanup at fallthru edge, so the outgoing edges may
632 be dead. */
633 purge_dead_edges (bb);
636 /* Assume that frequency of basic block B is known. Compute frequencies
637 and probabilities of outgoing edges. */
639 static void
640 compute_outgoing_frequencies (basic_block b)
642 edge e, f;
644 if (b->succ && b->succ->succ_next && !b->succ->succ_next->succ_next)
646 rtx note = find_reg_note (BB_END (b), REG_BR_PROB, NULL);
647 int probability;
649 if (note)
651 probability = INTVAL (XEXP (note, 0));
652 e = BRANCH_EDGE (b);
653 e->probability = probability;
654 e->count = ((b->count * probability + REG_BR_PROB_BASE / 2)
655 / REG_BR_PROB_BASE);
656 f = FALLTHRU_EDGE (b);
657 f->probability = REG_BR_PROB_BASE - probability;
658 f->count = b->count - e->count;
659 return;
663 if (b->succ && !b->succ->succ_next)
665 e = b->succ;
666 e->probability = REG_BR_PROB_BASE;
667 e->count = b->count;
668 return;
670 guess_outgoing_edge_probabilities (b);
671 if (b->count)
672 for (e = b->succ; e; e = e->succ_next)
673 e->count = ((b->count * e->probability + REG_BR_PROB_BASE / 2)
674 / REG_BR_PROB_BASE);
677 /* Assume that someone emitted code with control flow instructions to the
678 basic block. Update the data structure. */
680 void
681 find_many_sub_basic_blocks (sbitmap blocks)
683 basic_block bb, min, max;
685 FOR_EACH_BB (bb)
686 SET_STATE (bb,
687 TEST_BIT (blocks, bb->index) ? BLOCK_TO_SPLIT : BLOCK_ORIGINAL);
689 FOR_EACH_BB (bb)
690 if (STATE (bb) == BLOCK_TO_SPLIT)
691 find_bb_boundaries (bb);
693 FOR_EACH_BB (bb)
694 if (STATE (bb) != BLOCK_ORIGINAL)
695 break;
697 min = max = bb;
698 for (; bb != EXIT_BLOCK_PTR; bb = bb->next_bb)
699 if (STATE (bb) != BLOCK_ORIGINAL)
700 max = bb;
702 /* Now re-scan and wire in all edges. This expect simple (conditional)
703 jumps at the end of each new basic blocks. */
704 make_edges (min, max, 1);
706 /* Update branch probabilities. Expect only (un)conditional jumps
707 to be created with only the forward edges. */
708 if (profile_status != PROFILE_ABSENT)
709 FOR_BB_BETWEEN (bb, min, max->next_bb, next_bb)
711 edge e;
713 if (STATE (bb) == BLOCK_ORIGINAL)
714 continue;
715 if (STATE (bb) == BLOCK_NEW)
717 bb->count = 0;
718 bb->frequency = 0;
719 for (e = bb->pred; e; e = e->pred_next)
721 bb->count += e->count;
722 bb->frequency += EDGE_FREQUENCY (e);
726 compute_outgoing_frequencies (bb);
729 FOR_EACH_BB (bb)
730 SET_STATE (bb, 0);
733 /* Like above but for single basic block only. */
735 void
736 find_sub_basic_blocks (basic_block bb)
738 basic_block min, max, b;
739 basic_block next = bb->next_bb;
741 min = bb;
742 find_bb_boundaries (bb);
743 max = next->prev_bb;
745 /* Now re-scan and wire in all edges. This expect simple (conditional)
746 jumps at the end of each new basic blocks. */
747 make_edges (min, max, 1);
749 /* Update branch probabilities. Expect only (un)conditional jumps
750 to be created with only the forward edges. */
751 FOR_BB_BETWEEN (b, min, max->next_bb, next_bb)
753 edge e;
755 if (b != min)
757 b->count = 0;
758 b->frequency = 0;
759 for (e = b->pred; e; e = e->pred_next)
761 b->count += e->count;
762 b->frequency += EDGE_FREQUENCY (e);
766 compute_outgoing_frequencies (b);