* cp-tree.h (enum cp_storage_class): Remove trailing comma.
[official-gcc.git] / gcc / cfgbuild.c
blobac064cfc4114e4ac5504c26f8fe246dd0f7cce28
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 || GET_CODE (NEXT_INSN (insn)) != JUMP_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 abort ();
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 abort ();
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 ((GET_CODE (insn) == CODE_LABEL || GET_CODE (insn) == BARRIER)
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 if (GET_CODE (label) != CODE_LABEL)
187 abort ();
189 /* If the label was never emitted, this insn is junk, but avoid a
190 crash trying to refer to BLOCK_FOR_INSN (label). This can happen
191 as a result of a syntax error and a diagnostic has already been
192 printed. */
194 if (INSN_UID (label) == 0)
195 return;
197 cached_make_edge (edge_cache, src, BLOCK_FOR_INSN (label), flags);
200 /* Create the edges generated by INSN in REGION. */
202 void
203 rtl_make_eh_edge (sbitmap *edge_cache, basic_block src, rtx insn)
205 int is_call = GET_CODE (insn) == CALL_INSN ? EDGE_ABNORMAL_CALL : 0;
206 rtx handlers, i;
208 handlers = reachable_handlers (insn);
210 for (i = handlers; i; i = XEXP (i, 1))
211 make_label_edge (edge_cache, src, XEXP (i, 0),
212 EDGE_ABNORMAL | EDGE_EH | is_call);
214 free_INSN_LIST_list (&handlers);
217 /* Identify the edges between basic blocks MIN to MAX.
219 NONLOCAL_LABEL_LIST is a list of non-local labels in the function. Blocks
220 that are otherwise unreachable may be reachable with a non-local goto.
222 BB_EH_END is an array indexed by basic block number in which we record
223 the list of exception regions active at the end of the basic block. */
225 static void
226 make_edges (basic_block min, basic_block max, int update_p)
228 basic_block bb;
229 sbitmap *edge_cache = NULL;
231 /* Assume no computed jump; revise as we create edges. */
232 current_function_has_computed_jump = 0;
234 /* If we are partitioning hot and cold basic blocks into separate
235 sections, we cannot assume there is no computed jump. */
237 if (flag_reorder_blocks_and_partition)
238 current_function_has_computed_jump = 1;
240 /* Heavy use of computed goto in machine-generated code can lead to
241 nearly fully-connected CFGs. In that case we spend a significant
242 amount of time searching the edge lists for duplicates. */
243 if (forced_labels || cfun->max_jumptable_ents > 100)
245 edge_cache = sbitmap_vector_alloc (last_basic_block, last_basic_block);
246 sbitmap_vector_zero (edge_cache, last_basic_block);
248 if (update_p)
249 FOR_BB_BETWEEN (bb, min, max->next_bb, next_bb)
251 edge e;
253 for (e = bb->succ; e ; e = e->succ_next)
254 if (e->dest != EXIT_BLOCK_PTR)
255 SET_BIT (edge_cache[bb->index], e->dest->index);
259 /* By nature of the way these get numbered, ENTRY_BLOCK_PTR->next_bb block
260 is always the entry. */
261 if (min == ENTRY_BLOCK_PTR->next_bb)
262 cached_make_edge (edge_cache, ENTRY_BLOCK_PTR, min,
263 EDGE_FALLTHRU);
265 FOR_BB_BETWEEN (bb, min, max->next_bb, next_bb)
267 rtx insn, x;
268 enum rtx_code code;
269 int force_fallthru = 0;
270 edge e;
272 if (GET_CODE (BB_HEAD (bb)) == CODE_LABEL
273 && LABEL_ALT_ENTRY_P (BB_HEAD (bb)))
274 cached_make_edge (NULL, ENTRY_BLOCK_PTR, bb, 0);
276 /* Examine the last instruction of the block, and discover the
277 ways we can leave the block. */
279 insn = BB_END (bb);
280 code = GET_CODE (insn);
282 /* A branch. */
283 if (code == JUMP_INSN)
285 rtx tmp;
287 /* Recognize exception handling placeholders. */
288 if (GET_CODE (PATTERN (insn)) == RESX)
289 rtl_make_eh_edge (edge_cache, bb, insn);
291 /* Recognize a non-local goto as a branch outside the
292 current function. */
293 else if (find_reg_note (insn, REG_NON_LOCAL_GOTO, NULL_RTX))
296 /* Recognize a tablejump and do the right thing. */
297 else if (tablejump_p (insn, NULL, &tmp))
299 rtvec vec;
300 int j;
302 if (GET_CODE (PATTERN (tmp)) == ADDR_VEC)
303 vec = XVEC (PATTERN (tmp), 0);
304 else
305 vec = XVEC (PATTERN (tmp), 1);
307 for (j = GET_NUM_ELEM (vec) - 1; j >= 0; --j)
308 make_label_edge (edge_cache, bb,
309 XEXP (RTVEC_ELT (vec, j), 0), 0);
311 /* Some targets (eg, ARM) emit a conditional jump that also
312 contains the out-of-range target. Scan for these and
313 add an edge if necessary. */
314 if ((tmp = single_set (insn)) != NULL
315 && SET_DEST (tmp) == pc_rtx
316 && GET_CODE (SET_SRC (tmp)) == IF_THEN_ELSE
317 && GET_CODE (XEXP (SET_SRC (tmp), 2)) == LABEL_REF)
318 make_label_edge (edge_cache, bb,
319 XEXP (XEXP (SET_SRC (tmp), 2), 0), 0);
321 #ifdef CASE_DROPS_THROUGH
322 /* Silly VAXen. The ADDR_VEC is going to be in the way of
323 us naturally detecting fallthru into the next block. */
324 force_fallthru = 1;
325 #endif
328 /* If this is a computed jump, then mark it as reaching
329 everything on the forced_labels list. */
330 else if (computed_jump_p (insn))
332 current_function_has_computed_jump = 1;
334 for (x = forced_labels; x; x = XEXP (x, 1))
335 make_label_edge (edge_cache, bb, XEXP (x, 0), EDGE_ABNORMAL);
338 /* Returns create an exit out. */
339 else if (returnjump_p (insn))
340 cached_make_edge (edge_cache, bb, EXIT_BLOCK_PTR, 0);
342 /* Otherwise, we have a plain conditional or unconditional jump. */
343 else
345 if (! JUMP_LABEL (insn))
346 abort ();
347 make_label_edge (edge_cache, bb, JUMP_LABEL (insn), 0);
351 /* If this is a sibling call insn, then this is in effect a combined call
352 and return, and so we need an edge to the exit block. No need to
353 worry about EH edges, since we wouldn't have created the sibling call
354 in the first place. */
355 if (code == CALL_INSN && SIBLING_CALL_P (insn))
356 cached_make_edge (edge_cache, bb, EXIT_BLOCK_PTR,
357 EDGE_SIBCALL | EDGE_ABNORMAL);
359 /* If this is a CALL_INSN, then mark it as reaching the active EH
360 handler for this CALL_INSN. If we're handling non-call
361 exceptions then any insn can reach any of the active handlers.
362 Also mark the CALL_INSN as reaching any nonlocal goto handler. */
363 else if (code == CALL_INSN || flag_non_call_exceptions)
365 /* Add any appropriate EH edges. */
366 rtl_make_eh_edge (edge_cache, bb, insn);
368 if (code == CALL_INSN && nonlocal_goto_handler_labels)
370 /* ??? This could be made smarter: in some cases it's possible
371 to tell that certain calls will not do a nonlocal goto.
372 For example, if the nested functions that do the nonlocal
373 gotos do not have their addresses taken, then only calls to
374 those functions or to other nested functions that use them
375 could possibly do nonlocal gotos. */
377 /* We do know that a REG_EH_REGION note with a value less
378 than 0 is guaranteed not to perform a non-local goto. */
379 rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
381 if (!note || INTVAL (XEXP (note, 0)) >= 0)
382 for (x = nonlocal_goto_handler_labels; x; x = XEXP (x, 1))
383 make_label_edge (edge_cache, bb, XEXP (x, 0),
384 EDGE_ABNORMAL | EDGE_ABNORMAL_CALL);
388 /* Find out if we can drop through to the next block. */
389 insn = NEXT_INSN (insn);
390 for (e = bb->succ; e; e = e->succ_next)
391 if (e->dest == EXIT_BLOCK_PTR && e->flags & EDGE_FALLTHRU)
393 insn = 0;
394 break;
396 while (insn
397 && GET_CODE (insn) == NOTE
398 && NOTE_LINE_NUMBER (insn) != NOTE_INSN_BASIC_BLOCK)
399 insn = NEXT_INSN (insn);
401 if (!insn || (bb->next_bb == EXIT_BLOCK_PTR && force_fallthru))
402 cached_make_edge (edge_cache, bb, EXIT_BLOCK_PTR, EDGE_FALLTHRU);
403 else if (bb->next_bb != EXIT_BLOCK_PTR)
405 if (force_fallthru || insn == BB_HEAD (bb->next_bb))
406 cached_make_edge (edge_cache, bb, bb->next_bb, EDGE_FALLTHRU);
410 if (edge_cache)
411 sbitmap_vector_free (edge_cache);
414 /* Find all basic blocks of the function whose first insn is F.
416 Collect and return a list of labels whose addresses are taken. This
417 will be used in make_edges for use with computed gotos. */
419 static void
420 find_basic_blocks_1 (rtx f)
422 rtx insn, next;
423 rtx bb_note = NULL_RTX;
424 rtx head = NULL_RTX;
425 rtx end = NULL_RTX;
426 basic_block prev = ENTRY_BLOCK_PTR;
428 /* We process the instructions in a slightly different way than we did
429 previously. This is so that we see a NOTE_BASIC_BLOCK after we have
430 closed out the previous block, so that it gets attached at the proper
431 place. Since this form should be equivalent to the previous,
432 count_basic_blocks continues to use the old form as a check. */
434 for (insn = f; insn; insn = next)
436 enum rtx_code code = GET_CODE (insn);
438 next = NEXT_INSN (insn);
440 if ((GET_CODE (insn) == CODE_LABEL || GET_CODE (insn) == BARRIER)
441 && head)
443 prev = create_basic_block_structure (head, end, bb_note, prev);
444 head = end = NULL_RTX;
445 bb_note = NULL_RTX;
448 if (inside_basic_block_p (insn))
450 if (head == NULL_RTX)
451 head = insn;
452 end = insn;
455 if (head && control_flow_insn_p (insn))
457 prev = create_basic_block_structure (head, end, bb_note, prev);
458 head = end = NULL_RTX;
459 bb_note = NULL_RTX;
462 switch (code)
464 case NOTE:
466 int kind = NOTE_LINE_NUMBER (insn);
468 /* Look for basic block notes with which to keep the
469 basic_block_info pointers stable. Unthread the note now;
470 we'll put it back at the right place in create_basic_block.
471 Or not at all if we've already found a note in this block. */
472 if (kind == NOTE_INSN_BASIC_BLOCK)
474 if (bb_note == NULL_RTX)
475 bb_note = insn;
476 else
477 next = delete_insn (insn);
479 break;
482 case CODE_LABEL:
483 case JUMP_INSN:
484 case CALL_INSN:
485 case INSN:
486 case BARRIER:
487 break;
489 default:
490 abort ();
494 if (head != NULL_RTX)
495 create_basic_block_structure (head, end, bb_note, prev);
496 else if (bb_note)
497 delete_insn (bb_note);
499 if (last_basic_block != n_basic_blocks)
500 abort ();
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 /* Discover the edges of our cfg. */
550 make_edges (ENTRY_BLOCK_PTR->next_bb, EXIT_BLOCK_PTR->prev_bb, 0);
552 /* Do very simple cleanup now, for the benefit of code that runs between
553 here and cleanup_cfg, e.g. thread_prologue_and_epilogue_insns. */
554 tidy_fallthru_edges ();
556 #ifdef ENABLE_CHECKING
557 verify_flow_info ();
558 #endif
559 timevar_pop (TV_CFG);
562 /* State of basic block as seen by find_sub_basic_blocks. */
563 enum state {BLOCK_NEW = 0, BLOCK_ORIGINAL, BLOCK_TO_SPLIT};
565 #define STATE(BB) (enum state) ((size_t) (BB)->aux)
566 #define SET_STATE(BB, STATE) ((BB)->aux = (void *) (size_t) (STATE))
568 /* Scan basic block BB for possible BB boundaries inside the block
569 and create new basic blocks in the progress. */
571 static void
572 find_bb_boundaries (basic_block bb)
574 rtx insn = BB_HEAD (bb);
575 rtx end = BB_END (bb);
576 rtx flow_transfer_insn = NULL_RTX;
577 edge fallthru = NULL;
579 if (insn == BB_END (bb))
580 return;
582 if (GET_CODE (insn) == CODE_LABEL)
583 insn = NEXT_INSN (insn);
585 /* Scan insn chain and try to find new basic block boundaries. */
586 while (1)
588 enum rtx_code code = GET_CODE (insn);
590 /* On code label, split current basic block. */
591 if (code == CODE_LABEL)
593 fallthru = split_block (bb, PREV_INSN (insn));
594 if (flow_transfer_insn)
595 BB_END (bb) = flow_transfer_insn;
597 bb = fallthru->dest;
598 remove_edge (fallthru);
599 flow_transfer_insn = NULL_RTX;
600 if (LABEL_ALT_ENTRY_P (insn))
601 make_edge (ENTRY_BLOCK_PTR, bb, 0);
604 /* In case we've previously seen an insn that effects a control
605 flow transfer, split the block. */
606 if (flow_transfer_insn && inside_basic_block_p (insn))
608 fallthru = split_block (bb, PREV_INSN (insn));
609 BB_END (bb) = flow_transfer_insn;
610 bb = fallthru->dest;
611 remove_edge (fallthru);
612 flow_transfer_insn = NULL_RTX;
615 if (control_flow_insn_p (insn))
616 flow_transfer_insn = insn;
617 if (insn == end)
618 break;
619 insn = NEXT_INSN (insn);
622 /* In case expander replaced normal insn by sequence terminating by
623 return and barrier, or possibly other sequence not behaving like
624 ordinary jump, we need to take care and move basic block boundary. */
625 if (flow_transfer_insn)
626 BB_END (bb) = flow_transfer_insn;
628 /* We've possibly replaced the conditional jump by conditional jump
629 followed by cleanup at fallthru edge, so the outgoing edges may
630 be dead. */
631 purge_dead_edges (bb);
634 /* Assume that frequency of basic block B is known. Compute frequencies
635 and probabilities of outgoing edges. */
637 static void
638 compute_outgoing_frequencies (basic_block b)
640 edge e, f;
642 if (b->succ && b->succ->succ_next && !b->succ->succ_next->succ_next)
644 rtx note = find_reg_note (BB_END (b), REG_BR_PROB, NULL);
645 int probability;
647 if (!note)
648 return;
650 probability = INTVAL (XEXP (note, 0));
651 e = BRANCH_EDGE (b);
652 e->probability = probability;
653 e->count = ((b->count * probability + REG_BR_PROB_BASE / 2)
654 / REG_BR_PROB_BASE);
655 f = FALLTHRU_EDGE (b);
656 f->probability = REG_BR_PROB_BASE - probability;
657 f->count = b->count - e->count;
660 if (b->succ && !b->succ->succ_next)
662 e = b->succ;
663 e->probability = REG_BR_PROB_BASE;
664 e->count = b->count;
668 /* Assume that someone emitted code with control flow instructions to the
669 basic block. Update the data structure. */
671 void
672 find_many_sub_basic_blocks (sbitmap blocks)
674 basic_block bb, min, max;
676 FOR_EACH_BB (bb)
677 SET_STATE (bb,
678 TEST_BIT (blocks, bb->index) ? BLOCK_TO_SPLIT : BLOCK_ORIGINAL);
680 FOR_EACH_BB (bb)
681 if (STATE (bb) == BLOCK_TO_SPLIT)
682 find_bb_boundaries (bb);
684 FOR_EACH_BB (bb)
685 if (STATE (bb) != BLOCK_ORIGINAL)
686 break;
688 min = max = bb;
689 for (; bb != EXIT_BLOCK_PTR; bb = bb->next_bb)
690 if (STATE (bb) != BLOCK_ORIGINAL)
691 max = bb;
693 /* Now re-scan and wire in all edges. This expect simple (conditional)
694 jumps at the end of each new basic blocks. */
695 make_edges (min, max, 1);
697 /* Update branch probabilities. Expect only (un)conditional jumps
698 to be created with only the forward edges. */
699 FOR_BB_BETWEEN (bb, min, max->next_bb, next_bb)
701 edge e;
703 if (STATE (bb) == BLOCK_ORIGINAL)
704 continue;
705 if (STATE (bb) == BLOCK_NEW)
707 bb->count = 0;
708 bb->frequency = 0;
709 for (e = bb->pred; e; e = e->pred_next)
711 bb->count += e->count;
712 bb->frequency += EDGE_FREQUENCY (e);
716 compute_outgoing_frequencies (bb);
719 FOR_EACH_BB (bb)
720 SET_STATE (bb, 0);
723 /* Like above but for single basic block only. */
725 void
726 find_sub_basic_blocks (basic_block bb)
728 basic_block min, max, b;
729 basic_block next = bb->next_bb;
731 min = bb;
732 find_bb_boundaries (bb);
733 max = next->prev_bb;
735 /* Now re-scan and wire in all edges. This expect simple (conditional)
736 jumps at the end of each new basic blocks. */
737 make_edges (min, max, 1);
739 /* Update branch probabilities. Expect only (un)conditional jumps
740 to be created with only the forward edges. */
741 FOR_BB_BETWEEN (b, min, max->next_bb, next_bb)
743 edge e;
745 if (b != min)
747 b->count = 0;
748 b->frequency = 0;
749 for (e = b->pred; e; e = e->pred_next)
751 b->count += e->count;
752 b->frequency += EDGE_FREQUENCY (e);
756 compute_outgoing_frequencies (b);