Lines Matching defs:bb

251   basic_block bb;
254 && (bb = NOTE_BASIC_BLOCK (bb_note)) != NULL
255 && bb->aux == NULL)
276 bb = alloc_block ();
278 init_rtl_bb_info (bb);
296 NOTE_BASIC_BLOCK (bb_note) = bb;
299 /* Always include the bb note in the block. */
303 BB_HEAD (bb) = head;
304 BB_END (bb) = end;
305 bb->index = last_basic_block++;
306 bb->flags = BB_NEW | BB_RTL;
307 link_block (bb, after);
308 SET_BASIC_BLOCK (bb->index, bb);
309 update_bb_for_insn (bb);
310 BB_SET_PARTITION (bb, BB_UNPARTITIONED);
314 bb->aux = bb;
316 return bb;
328 basic_block bb;
343 bb = create_basic_block_structure (head, end, NULL, after);
344 bb->aux = NULL;
345 return bb;
397 basic_block bb;
399 FOR_EACH_BB (bb)
401 rtx end = BB_END (bb);
404 for (insn = BB_HEAD (bb); ; insn = NEXT_INSN (insn))
406 BLOCK_FOR_INSN (insn) = bb;
466 update_bb_for_insn (basic_block bb)
470 for (insn = BB_HEAD (bb); ; insn = NEXT_INSN (insn))
473 set_block_for_insn (insn, bb);
474 if (insn == BB_END (bb))
484 rtl_split_block (basic_block bb, void *insnp)
493 insn = first_insn_after_basic_block_note (bb);
504 if (insn == BB_END (bb))
508 new_bb = create_basic_block (NEXT_INSN (insn), BB_END (bb), bb);
509 BB_COPY_PARTITION (new_bb, bb);
510 BB_END (bb) = insn;
513 new_bb->succs = bb->succs;
514 bb->succs = NULL;
518 if (bb->il.rtl->global_live_at_start)
522 COPY_REG_SET (new_bb->il.rtl->global_live_at_end, bb->il.rtl->global_live_at_end);
529 COPY_REG_SET (new_bb->il.rtl->global_live_at_start, bb->il.rtl->global_live_at_end);
531 COPY_REG_SET (bb->il.rtl->global_live_at_end,
538 bb->flags |= BB_DIRTY;
652 bb-reorder.c:partition_hot_cold_basic_blocks for complete details. */
712 bb-reorder.c:partition_hot_cold_basic_blocks for complete details. */
1044 This allows bb-reorder to make such edge non-fallthru. */
1061 basic_block bb = create_basic_block (BB_HEAD (e->dest), NULL, ENTRY_BLOCK_PTR);
1065 e->src = bb;
1080 VEC_safe_push (edge, gc, bb->succs, e);
1081 make_single_succ_edge (ENTRY_BLOCK_PTR, bb, EDGE_FALLTHRU);
1250 rtl_move_block_after (basic_block bb ATTRIBUTE_UNUSED,
1266 basic_block bb;
1298 bb = create_basic_block (before, NULL, edge_in->src);
1299 BB_COPY_PARTITION (bb, edge_in->src);
1303 bb = create_basic_block (before, NULL, edge_in->dest->prev_bb);
1305 BB_COPY_PARTITION (bb, edge_in->dest);
1311 bb->il.rtl->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
1312 bb->il.rtl->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
1313 COPY_REG_SET (bb->il.rtl->global_live_at_start,
1315 COPY_REG_SET (bb->il.rtl->global_live_at_end,
1319 make_single_succ_edge (bb, edge_in->dest, EDGE_FALLTHRU);
1325 edge redirected = redirect_edge_and_branch (edge_in, bb);
1329 redirect_edge_succ (edge_in, bb);
1331 return bb;
1362 basic_block bb = NULL;
1385 bb = e->dest;
1393 bb = e->dest;
1397 tmp = BB_HEAD (bb);
1402 if (tmp == BB_HEAD (bb))
1416 bb = e->src;
1424 if (JUMP_P (BB_END (bb)))
1425 before = BB_END (bb);
1432 after = BB_END (bb);
1438 bb = split_edge (e);
1439 after = BB_END (bb);
1450 for (cur_insn = BB_HEAD (bb); cur_insn != NEXT_INSN (BB_END (bb));
1459 if (JUMP_P (BB_END (bb))
1460 && !any_condjump_p (BB_END (bb))
1461 && (single_succ_edge (bb)->flags & EDGE_CROSSING))
1462 REG_NOTES (BB_END (bb)) = gen_rtx_EXPR_LIST
1463 (REG_CROSSING_JUMP, NULL_RTX, REG_NOTES (BB_END (bb)));
1485 e = single_succ_edge (bb);
1487 && single_succ_p (bb) && (e->flags & EDGE_FALLTHRU));
1499 bb->aux = &bb->aux;
1507 basic_block bb;
1515 FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
1520 FOR_EACH_EDGE (e, ei, bb->succs)
1533 FOR_EACH_BB (bb)
1534 if (bb->aux)
1536 SET_BIT (blocks, bb->index);
1537 /* Check for forgotten bb->aux values before commit_edge_insertions
1539 gcc_assert (bb->aux == &bb->aux);
1540 bb->aux = NULL;
1553 basic_block bb;
1561 FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
1566 FOR_EACH_EDGE (e, ei, bb->succs)
1579 FOR_EACH_BB (bb)
1580 if (bb->aux)
1582 SET_BIT (blocks, bb->index);
1583 /* Check for forgotten bb->aux values before commit_edge_insertions
1585 gcc_assert (bb->aux == &bb->aux);
1586 bb->aux = NULL;
1597 rtl_dump_bb (basic_block bb, FILE *outf, int indent)
1608 dump_regset (bb->il.rtl->global_live_at_start, outf);
1611 for (insn = BB_HEAD (bb), last = NEXT_INSN (BB_END (bb)); insn != last;
1616 dump_regset (bb->il.rtl->global_live_at_end, outf);
1639 basic_block bb;
1641 FOR_EACH_BB_REVERSE (bb)
1645 start[INSN_UID (BB_HEAD (bb))] = bb;
1646 end[INSN_UID (BB_END (bb))] = bb;
1647 for (x = BB_HEAD (bb); x != NULL_RTX; x = NEXT_INSN (x))
1655 if (x == BB_END (bb))
1664 if ((bb = start[INSN_UID (tmp_rtx)]) != NULL)
1667 bb->index);
1668 dump_regset (bb->il.rtl->global_live_at_start, outf);
1681 if ((bb = end[INSN_UID (tmp_rtx)]) != NULL)
1684 bb->index);
1685 dump_regset (bb->il.rtl->global_live_at_end, outf);
1709 update_br_prob_note (basic_block bb)
1712 if (!JUMP_P (BB_END (bb)))
1714 note = find_reg_note (BB_END (bb), REG_BR_PROB, NULL_RTX);
1715 if (!note || INTVAL (XEXP (note, 0)) == BRANCH_EDGE (bb)->probability)
1717 XEXP (note, 0) = GEN_INT (BRANCH_EDGE (bb)->probability);
1723 get_last_bb_insn (basic_block bb)
1726 rtx end = BB_END (bb);
1768 basic_block bb;
1772 FOR_EACH_BB_REVERSE (bb)
1774 rtx head = BB_HEAD (bb);
1775 rtx end = BB_END (bb);
1782 if (!(bb->flags & BB_RTL))
1784 error ("BB_RTL flag not set for block %d", bb->index);
1791 INSN_UID (end), bb->index);
1805 INSN_UID (x), bb->index, bb_info[INSN_UID (x)]->index);
1809 bb_info[INSN_UID (x)] = bb;
1817 INSN_UID (head), bb->index);
1825 FOR_EACH_BB_REVERSE (bb)
1832 if (JUMP_P (BB_END (bb))
1833 && (note = find_reg_note (BB_END (bb), REG_BR_PROB, NULL_RTX))
1834 && EDGE_COUNT (bb->succs) >= 2
1835 && any_condjump_p (BB_END (bb)))
1837 if (INTVAL (XEXP (note, 0)) != BRANCH_EDGE (bb)->probability
1841 INTVAL (XEXP (note, 0)), BRANCH_EDGE (bb)->probability);
1845 FOR_EACH_EDGE (e, ei, bb->succs)
1855 error ("fallthru edge crosses section boundary (bb %i)",
1877 if (n_eh && GET_CODE (PATTERN (BB_END (bb))) != RESX
1878 && !find_reg_note (BB_END (bb), REG_EH_REGION, NULL_RTX))
1880 error ("missing REG_EH_REGION note in the end of bb %i", bb->index);
1884 && (!JUMP_P (BB_END (bb))
1885 || (n_branch > 1 && (any_uncondjump_p (BB_END (bb))
1886 || any_condjump_p (BB_END (bb))))))
1888 error ("too many outgoing branch edges from bb %i", bb->index);
1891 if (n_fallthru && any_uncondjump_p (BB_END (bb)))
1893 error ("fallthru edge after unconditional jump %i", bb->index);
1896 if (n_branch != 1 && any_uncondjump_p (BB_END (bb)))
1898 error ("wrong amount of branch edges after unconditional jump %i", bb->index);
1901 if (n_branch != 1 && any_condjump_p (BB_END (bb))
1902 && JUMP_LABEL (BB_END (bb)) != BB_HEAD (fallthru->dest))
1905 bb->index);
1908 if (n_call && !CALL_P (BB_END (bb)))
1910 error ("call edges for non-call insn in bb %i", bb->index);
1914 && (!CALL_P (BB_END (bb)) && n_call != n_abnormal)
1915 && (!JUMP_P (BB_END (bb))
1916 || any_condjump_p (BB_END (bb))
1917 || any_uncondjump_p (BB_END (bb))))
1919 error ("abnormal edges for no purpose in bb %i", bb->index);
1923 for (x = BB_HEAD (bb); x != NEXT_INSN (BB_END (bb)); x = NEXT_INSN (x))
1926 if (!BARRIER_P (x) && BLOCK_FOR_INSN (x) != bb)
1932 INSN_UID (x), bb->index);
1936 INSN_UID (x), bb->index, BLOCK_FOR_INSN (x)->index);
1944 x = BB_HEAD (bb);
1947 if (BB_END (bb) == x)
1950 bb->index);
1957 if (!NOTE_INSN_BASIC_BLOCK_P (x) || NOTE_BASIC_BLOCK (x) != bb)
1960 bb->index);
1964 if (BB_END (bb) == x)
1973 INSN_UID (x), bb->index);
1977 if (x == BB_END (bb))
1982 error ("in basic block %d:", bb->index);
2005 basic_block bb;
2012 FOR_EACH_BB_REVERSE (bb)
2017 if (bb->predictions)
2019 error ("bb prediction set for block %i, but it is not used in RTL land", bb->index);
2023 FOR_EACH_EDGE (e, ei, bb->succs)
2031 for (insn = BB_END (bb); !insn || !BARRIER_P (insn);
2037 error ("missing barrier after block %i", bb->index);
2074 bb = NOTE_BASIC_BLOCK (x);
2077 if (bb != last_bb_seen->next_bb)
2080 curr_bb = last_bb_seen = bb;
2117 ("number of bb notes in insn chain (%d) != n_basic_blocks (%d)",
2129 purge_dead_edges (basic_block bb)
2132 rtx insn = BB_END (bb), note;
2150 for (ei = ei_start (bb->succs); (e = ei_safe_edge (ei)); )
2157 if (can_throw_internal (BB_END (bb))
2160 || CALL_P (BB_END (bb))))
2168 if (CALL_P (BB_END (bb))
2183 bb->flags |= BB_DIRTY;
2210 for (ei = ei_start (bb->succs); (e = ei_safe_edge (ei)); )
2251 bb->flags |= BB_DIRTY;
2256 if (EDGE_COUNT (bb->succs) == 0 || !purged)
2260 fprintf (dump_file, "Purged edges from bb %i\n", bb->index);
2266 if (single_succ_p (bb))
2268 single_succ_edge (bb)->probability = REG_BR_PROB_BASE;
2269 single_succ_edge (bb)->count = bb->count;
2277 b = BRANCH_EDGE (bb);
2278 f = FALLTHRU_EDGE (bb);
2281 b->count = bb->count * b->probability / REG_BR_PROB_BASE;
2282 f->count = bb->count * f->probability / REG_BR_PROB_BASE;
2293 gcc_assert (single_succ_p (bb));
2294 gcc_assert (single_succ_edge (bb)->flags
2306 FOR_EACH_EDGE (e, ei, bb->succs)
2319 for (ei = ei_start (bb->succs); (e = ei_safe_edge (ei)); )
2323 bb->flags |= BB_DIRTY;
2331 gcc_assert (single_succ_p (bb));
2333 single_succ_edge (bb)->probability = REG_BR_PROB_BASE;
2334 single_succ_edge (bb)->count = bb->count;
2337 fprintf (dump_file, "Purged non-fallthru edges from bb %i\n",
2338 bb->index);
2349 basic_block bb;
2351 FOR_EACH_BB (bb)
2353 bool purged_here = purge_dead_edges (bb);
2364 cfg_layout_split_block (basic_block bb, void *insnp)
2367 basic_block new_bb = rtl_split_block (bb, insn);
2369 new_bb->il.rtl->footer = bb->il.rtl->footer;
2370 bb->il.rtl->footer = NULL;
2400 fprintf (dump_file, "Redirecting entry edge from bb %i to %i\n",
2472 cfg_layout_delete_block (basic_block bb)
2474 rtx insn, next, prev = PREV_INSN (BB_HEAD (bb)), *to, remaints;
2476 if (bb->il.rtl->header)
2478 next = BB_HEAD (bb);
2480 NEXT_INSN (prev) = bb->il.rtl->header;
2482 set_first_insn (bb->il.rtl->header);
2483 PREV_INSN (bb->il.rtl->header) = prev;
2484 insn = bb->il.rtl->header;
2490 next = NEXT_INSN (BB_END (bb));
2491 if (bb->il.rtl->footer)
2493 insn = bb->il.rtl->footer;
2501 bb->il.rtl->footer = NEXT_INSN (insn);
2509 if (bb->il.rtl->footer)
2511 insn = BB_END (bb);
2512 NEXT_INSN (insn) = bb->il.rtl->footer;
2513 PREV_INSN (bb->il.rtl->footer) = insn;
2523 if (bb->next_bb != EXIT_BLOCK_PTR)
2524 to = &bb->next_bb->il.rtl->header;
2528 rtl_delete_block (bb);
2564 bb-reorder.c:partition_hot_cold_basic_blocks for complete details. */
2713 rtl_block_ends_with_call_p (basic_block bb)
2715 rtx insn = BB_END (bb);
2718 && insn != BB_HEAD (bb)
2727 rtl_block_ends_with_condjump_p (basic_block bb)
2729 return any_condjump_p (BB_END (bb));
2793 basic_block bb = EXIT_BLOCK_PTR->prev_bb;
2794 rtx insn = BB_END (bb);
2797 while (insn != BB_HEAD (bb)
2805 e = find_edge (bb, EXIT_BLOCK_PTR);
2820 basic_block bb = BASIC_BLOCK (i);
2824 if (!bb)
2830 for (insn = BB_END (bb); ; insn = prev_insn)
2841 while (split_at_insn != BB_END (bb)
2851 if (split_at_insn == BB_END (bb))
2853 e = find_edge (bb, EXIT_BLOCK_PTR);
2860 if (split_at_insn != BB_END (bb))
2862 e = split_block (bb, split_at_insn);
2867 make_edge (bb, EXIT_BLOCK_PTR, EDGE_FAKE);
2870 if (insn == BB_HEAD (bb))
2941 init_rtl_bb_info (basic_block bb)
2943 gcc_assert (!bb->il.rtl);
2944 bb->il.rtl = ggc_alloc_cleared (sizeof (struct rtl_bb_info));
2951 insert_insn_end_bb_new (rtx pat, basic_block bb)
2953 rtx insn = BB_END (bb);
2966 && (!single_succ_p (bb)
2967 || single_succ_edge (bb)->flags & EDGE_ABNORMAL)))
3002 && (!single_succ_p (bb)
3003 || single_succ_edge (bb)->flags & EDGE_ABNORMAL))
3013 insn = find_first_parameter_load (insn, BB_HEAD (bb));