00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "config.h"
00023 #include "system.h"
00024 #include "coretypes.h"
00025 #include "tm.h"
00026 #include "tree.h"
00027 #include "rtl.h"
00028 #include "basic-block.h"
00029 #include "tree-flow.h"
00030 #include "timevar.h"
00031 #include "toplev.h"
00032
00033
00034 static struct cfg_hooks *cfg_hooks;
00035
00036
00037 void
00038 rtl_register_cfg_hooks (void)
00039 {
00040 cfg_hooks = &rtl_cfg_hooks;
00041 }
00042
00043
00044 void
00045 cfg_layout_rtl_register_cfg_hooks (void)
00046 {
00047 cfg_hooks = &cfg_layout_rtl_cfg_hooks;
00048 }
00049
00050
00051
00052 void
00053 tree_register_cfg_hooks (void)
00054 {
00055 cfg_hooks = &tree_cfg_hooks;
00056 }
00057
00058
00059
00060 int
00061 ir_type (void)
00062 {
00063 return cfg_hooks == &tree_cfg_hooks ? 1 : 0;
00064 }
00065
00066
00067
00068
00069
00070
00071 void
00072 verify_flow_info (void)
00073 {
00074 size_t *edge_checksum;
00075 int err = 0;
00076 basic_block bb, last_bb_seen;
00077 basic_block *last_visited;
00078
00079 timevar_push (TV_CFG_VERIFY);
00080 last_visited = XCNEWVEC (basic_block, last_basic_block);
00081 edge_checksum = XCNEWVEC (size_t, last_basic_block);
00082
00083
00084 last_bb_seen = ENTRY_BLOCK_PTR;
00085 FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR->next_bb, NULL, next_bb)
00086 {
00087 if (bb != EXIT_BLOCK_PTR
00088 && bb != BASIC_BLOCK (bb->index))
00089 {
00090 error ("bb %d on wrong place", bb->index);
00091 err = 1;
00092 }
00093
00094 if (bb->prev_bb != last_bb_seen)
00095 {
00096 error ("prev_bb of %d should be %d, not %d",
00097 bb->index, last_bb_seen->index, bb->prev_bb->index);
00098 err = 1;
00099 }
00100
00101 last_bb_seen = bb;
00102 }
00103
00104
00105 FOR_EACH_BB_REVERSE (bb)
00106 {
00107 int n_fallthru = 0;
00108 edge e;
00109 edge_iterator ei;
00110
00111 if (bb->count < 0)
00112 {
00113 error ("verify_flow_info: Wrong count of block %i %i",
00114 bb->index, (int)bb->count);
00115 err = 1;
00116 }
00117 if (bb->frequency < 0)
00118 {
00119 error ("verify_flow_info: Wrong frequency of block %i %i",
00120 bb->index, bb->frequency);
00121 err = 1;
00122 }
00123 FOR_EACH_EDGE (e, ei, bb->succs)
00124 {
00125 if (last_visited [e->dest->index] == bb)
00126 {
00127 error ("verify_flow_info: Duplicate edge %i->%i",
00128 e->src->index, e->dest->index);
00129 err = 1;
00130 }
00131 if (e->probability < 0 || e->probability > REG_BR_PROB_BASE)
00132 {
00133 error ("verify_flow_info: Wrong probability of edge %i->%i %i",
00134 e->src->index, e->dest->index, e->probability);
00135 err = 1;
00136 }
00137 if (e->count < 0)
00138 {
00139 error ("verify_flow_info: Wrong count of edge %i->%i %i",
00140 e->src->index, e->dest->index, (int)e->count);
00141 err = 1;
00142 }
00143
00144 last_visited [e->dest->index] = bb;
00145
00146 if (e->flags & EDGE_FALLTHRU)
00147 n_fallthru++;
00148
00149 if (e->src != bb)
00150 {
00151 error ("verify_flow_info: Basic block %d succ edge is corrupted",
00152 bb->index);
00153 fprintf (stderr, "Predecessor: ");
00154 dump_edge_info (stderr, e, 0);
00155 fprintf (stderr, "\nSuccessor: ");
00156 dump_edge_info (stderr, e, 1);
00157 fprintf (stderr, "\n");
00158 err = 1;
00159 }
00160
00161 edge_checksum[e->dest->index] += (size_t) e;
00162 }
00163 if (n_fallthru > 1)
00164 {
00165 error ("wrong amount of branch edges after unconditional jump %i", bb->index);
00166 err = 1;
00167 }
00168
00169 FOR_EACH_EDGE (e, ei, bb->preds)
00170 {
00171 if (e->dest != bb)
00172 {
00173 error ("basic block %d pred edge is corrupted", bb->index);
00174 fputs ("Predecessor: ", stderr);
00175 dump_edge_info (stderr, e, 0);
00176 fputs ("\nSuccessor: ", stderr);
00177 dump_edge_info (stderr, e, 1);
00178 fputc ('\n', stderr);
00179 err = 1;
00180 }
00181
00182 if (ei.index != e->dest_idx)
00183 {
00184 error ("basic block %d pred edge is corrupted", bb->index);
00185 error ("its dest_idx should be %d, not %d",
00186 ei.index, e->dest_idx);
00187 fputs ("Predecessor: ", stderr);
00188 dump_edge_info (stderr, e, 0);
00189 fputs ("\nSuccessor: ", stderr);
00190 dump_edge_info (stderr, e, 1);
00191 fputc ('\n', stderr);
00192 err = 1;
00193 }
00194
00195 edge_checksum[e->dest->index] -= (size_t) e;
00196 }
00197 }
00198
00199
00200 {
00201 edge e;
00202 edge_iterator ei;
00203
00204 FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
00205 edge_checksum[e->dest->index] += (size_t) e;
00206
00207 FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
00208 edge_checksum[e->dest->index] -= (size_t) e;
00209 }
00210
00211 FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
00212 if (edge_checksum[bb->index])
00213 {
00214 error ("basic block %i edge lists are corrupted", bb->index);
00215 err = 1;
00216 }
00217
00218 last_bb_seen = ENTRY_BLOCK_PTR;
00219
00220
00221 free (last_visited);
00222 free (edge_checksum);
00223
00224 if (cfg_hooks->verify_flow_info)
00225 err |= cfg_hooks->verify_flow_info ();
00226 if (err)
00227 internal_error ("verify_flow_info failed");
00228 timevar_pop (TV_CFG_VERIFY);
00229 }
00230
00231
00232
00233
00234
00235 void
00236 dump_bb (basic_block bb, FILE *outf, int indent)
00237 {
00238 edge e;
00239 edge_iterator ei;
00240 char *s_indent;
00241
00242 s_indent = alloca ((size_t) indent + 1);
00243 memset (s_indent, ' ', (size_t) indent);
00244 s_indent[indent] = '\0';
00245
00246 fprintf (outf, ";;%s basic block %d, loop depth %d, count ",
00247 s_indent, bb->index, bb->loop_depth);
00248 fprintf (outf, HOST_WIDEST_INT_PRINT_DEC, (HOST_WIDEST_INT) bb->count);
00249 putc ('\n', outf);
00250
00251 fprintf (outf, ";;%s prev block ", s_indent);
00252 if (bb->prev_bb)
00253 fprintf (outf, "%d, ", bb->prev_bb->index);
00254 else
00255 fprintf (outf, "(nil), ");
00256 fprintf (outf, "next block ");
00257 if (bb->next_bb)
00258 fprintf (outf, "%d", bb->next_bb->index);
00259 else
00260 fprintf (outf, "(nil)");
00261 putc ('\n', outf);
00262
00263 fprintf (outf, ";;%s pred: ", s_indent);
00264 FOR_EACH_EDGE (e, ei, bb->preds)
00265 dump_edge_info (outf, e, 0);
00266 putc ('\n', outf);
00267
00268 fprintf (outf, ";;%s succ: ", s_indent);
00269 FOR_EACH_EDGE (e, ei, bb->succs)
00270 dump_edge_info (outf, e, 1);
00271 putc ('\n', outf);
00272
00273 if (cfg_hooks->dump_bb)
00274 cfg_hooks->dump_bb (bb, outf, indent);
00275 }
00276
00277
00278
00279
00280
00281
00282 edge
00283 redirect_edge_and_branch (edge e, basic_block dest)
00284 {
00285 edge ret;
00286
00287 if (!cfg_hooks->redirect_edge_and_branch)
00288 internal_error ("%s does not support redirect_edge_and_branch",
00289 cfg_hooks->name);
00290
00291 ret = cfg_hooks->redirect_edge_and_branch (e, dest);
00292
00293 return ret;
00294 }
00295
00296
00297
00298
00299
00300 basic_block
00301 redirect_edge_and_branch_force (edge e, basic_block dest)
00302 {
00303 basic_block ret;
00304
00305 if (!cfg_hooks->redirect_edge_and_branch_force)
00306 internal_error ("%s does not support redirect_edge_and_branch_force",
00307 cfg_hooks->name);
00308
00309 ret = cfg_hooks->redirect_edge_and_branch_force (e, dest);
00310
00311 return ret;
00312 }
00313
00314
00315
00316
00317
00318 edge
00319 split_block (basic_block bb, void *i)
00320 {
00321 basic_block new_bb;
00322
00323 if (!cfg_hooks->split_block)
00324 internal_error ("%s does not support split_block", cfg_hooks->name);
00325
00326 new_bb = cfg_hooks->split_block (bb, i);
00327 if (!new_bb)
00328 return NULL;
00329
00330 new_bb->count = bb->count;
00331 new_bb->frequency = bb->frequency;
00332 new_bb->loop_depth = bb->loop_depth;
00333
00334 if (dom_info_available_p (CDI_DOMINATORS))
00335 {
00336 redirect_immediate_dominators (CDI_DOMINATORS, bb, new_bb);
00337 set_immediate_dominator (CDI_DOMINATORS, new_bb, bb);
00338 }
00339
00340 return make_single_succ_edge (bb, new_bb, EDGE_FALLTHRU);
00341 }
00342
00343
00344
00345 edge
00346 split_block_after_labels (basic_block bb)
00347 {
00348 return split_block (bb, NULL);
00349 }
00350
00351
00352
00353
00354 bool
00355 move_block_after (basic_block bb, basic_block after)
00356 {
00357 bool ret;
00358
00359 if (!cfg_hooks->move_block_after)
00360 internal_error ("%s does not support move_block_after", cfg_hooks->name);
00361
00362 ret = cfg_hooks->move_block_after (bb, after);
00363
00364 return ret;
00365 }
00366
00367
00368
00369 void
00370 delete_basic_block (basic_block bb)
00371 {
00372 if (!cfg_hooks->delete_basic_block)
00373 internal_error ("%s does not support delete_basic_block", cfg_hooks->name);
00374
00375 cfg_hooks->delete_basic_block (bb);
00376
00377
00378
00379 while (EDGE_COUNT (bb->preds) != 0)
00380 remove_edge (EDGE_PRED (bb, 0));
00381 while (EDGE_COUNT (bb->succs) != 0)
00382 remove_edge (EDGE_SUCC (bb, 0));
00383
00384 if (dom_computed[CDI_DOMINATORS])
00385 delete_from_dominance_info (CDI_DOMINATORS, bb);
00386 if (dom_computed[CDI_POST_DOMINATORS])
00387 delete_from_dominance_info (CDI_POST_DOMINATORS, bb);
00388
00389
00390 expunge_block (bb);
00391 }
00392
00393
00394
00395 basic_block
00396 split_edge (edge e)
00397 {
00398 basic_block ret;
00399 gcov_type count = e->count;
00400 int freq = EDGE_FREQUENCY (e);
00401 edge f;
00402 bool irr = (e->flags & EDGE_IRREDUCIBLE_LOOP) != 0;
00403
00404 if (!cfg_hooks->split_edge)
00405 internal_error ("%s does not support split_edge", cfg_hooks->name);
00406
00407 ret = cfg_hooks->split_edge (e);
00408 ret->count = count;
00409 ret->frequency = freq;
00410 single_succ_edge (ret)->probability = REG_BR_PROB_BASE;
00411 single_succ_edge (ret)->count = count;
00412
00413 if (irr)
00414 {
00415 ret->flags |= BB_IRREDUCIBLE_LOOP;
00416 single_pred_edge (ret)->flags |= EDGE_IRREDUCIBLE_LOOP;
00417 single_succ_edge (ret)->flags |= EDGE_IRREDUCIBLE_LOOP;
00418 }
00419
00420 if (dom_computed[CDI_DOMINATORS])
00421 set_immediate_dominator (CDI_DOMINATORS, ret, single_pred (ret));
00422
00423 if (dom_computed[CDI_DOMINATORS] >= DOM_NO_FAST_QUERY)
00424 {
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434 if (get_immediate_dominator (CDI_DOMINATORS, single_succ (ret))
00435 == single_pred (ret))
00436 {
00437 edge_iterator ei;
00438 FOR_EACH_EDGE (f, ei, single_succ (ret)->preds)
00439 {
00440 if (f == single_succ_edge (ret))
00441 continue;
00442
00443 if (!dominated_by_p (CDI_DOMINATORS, f->src,
00444 single_succ (ret)))
00445 break;
00446 }
00447
00448 if (!f)
00449 set_immediate_dominator (CDI_DOMINATORS, single_succ (ret), ret);
00450 }
00451 };
00452
00453 return ret;
00454 }
00455
00456
00457
00458
00459
00460 basic_block
00461 create_basic_block (void *head, void *end, basic_block after)
00462 {
00463 basic_block ret;
00464
00465 if (!cfg_hooks->create_basic_block)
00466 internal_error ("%s does not support create_basic_block", cfg_hooks->name);
00467
00468 ret = cfg_hooks->create_basic_block (head, end, after);
00469
00470 if (dom_computed[CDI_DOMINATORS])
00471 add_to_dominance_info (CDI_DOMINATORS, ret);
00472 if (dom_computed[CDI_POST_DOMINATORS])
00473 add_to_dominance_info (CDI_POST_DOMINATORS, ret);
00474
00475 return ret;
00476 }
00477
00478
00479
00480 basic_block
00481 create_empty_bb (basic_block after)
00482 {
00483 return create_basic_block (NULL, NULL, after);
00484 }
00485
00486
00487
00488 bool
00489 can_merge_blocks_p (basic_block bb1, basic_block bb2)
00490 {
00491 bool ret;
00492
00493 if (!cfg_hooks->can_merge_blocks_p)
00494 internal_error ("%s does not support can_merge_blocks_p", cfg_hooks->name);
00495
00496 ret = cfg_hooks->can_merge_blocks_p (bb1, bb2);
00497
00498 return ret;
00499 }
00500
00501 void
00502 predict_edge (edge e, enum br_predictor predictor, int probability)
00503 {
00504 if (!cfg_hooks->predict_edge)
00505 internal_error ("%s does not support predict_edge", cfg_hooks->name);
00506
00507 cfg_hooks->predict_edge (e, predictor, probability);
00508 }
00509
00510 bool
00511 predicted_by_p (basic_block bb, enum br_predictor predictor)
00512 {
00513 if (!cfg_hooks->predict_edge)
00514 internal_error ("%s does not support predicted_by_p", cfg_hooks->name);
00515
00516 return cfg_hooks->predicted_by_p (bb, predictor);
00517 }
00518
00519
00520
00521 void
00522 merge_blocks (basic_block a, basic_block b)
00523 {
00524 edge e;
00525 edge_iterator ei;
00526
00527 if (!cfg_hooks->merge_blocks)
00528 internal_error ("%s does not support merge_blocks", cfg_hooks->name);
00529
00530 cfg_hooks->merge_blocks (a, b);
00531
00532
00533
00534
00535
00536
00537 while (EDGE_COUNT (a->succs) != 0)
00538 remove_edge (EDGE_SUCC (a, 0));
00539
00540
00541 FOR_EACH_EDGE (e, ei, b->succs)
00542 e->src = a;
00543 a->succs = b->succs;
00544 a->flags |= b->flags;
00545
00546
00547 b->preds = b->succs = NULL;
00548
00549 if (dom_computed[CDI_DOMINATORS])
00550 redirect_immediate_dominators (CDI_DOMINATORS, b, a);
00551
00552 if (dom_computed[CDI_DOMINATORS])
00553 delete_from_dominance_info (CDI_DOMINATORS, b);
00554 if (dom_computed[CDI_POST_DOMINATORS])
00555 delete_from_dominance_info (CDI_POST_DOMINATORS, b);
00556
00557 expunge_block (b);
00558 }
00559
00560
00561
00562
00563
00564 edge
00565 make_forwarder_block (basic_block bb, bool (*redirect_edge_p) (edge),
00566 void (*new_bb_cbk) (basic_block))
00567 {
00568 edge e, fallthru;
00569 edge_iterator ei;
00570 basic_block dummy, jump;
00571
00572 if (!cfg_hooks->make_forwarder_block)
00573 internal_error ("%s does not support make_forwarder_block",
00574 cfg_hooks->name);
00575
00576 fallthru = split_block_after_labels (bb);
00577 dummy = fallthru->src;
00578 bb = fallthru->dest;
00579
00580
00581 for (ei = ei_start (dummy->preds); (e = ei_safe_edge (ei)); )
00582 {
00583 if (redirect_edge_p (e))
00584 {
00585 ei_next (&ei);
00586 continue;
00587 }
00588
00589 dummy->frequency -= EDGE_FREQUENCY (e);
00590 dummy->count -= e->count;
00591 if (dummy->frequency < 0)
00592 dummy->frequency = 0;
00593 if (dummy->count < 0)
00594 dummy->count = 0;
00595 fallthru->count -= e->count;
00596 if (fallthru->count < 0)
00597 fallthru->count = 0;
00598
00599 jump = redirect_edge_and_branch_force (e, bb);
00600 if (jump)
00601 new_bb_cbk (jump);
00602 }
00603
00604 if (dom_info_available_p (CDI_DOMINATORS))
00605 {
00606 basic_block doms_to_fix[2];
00607
00608 doms_to_fix[0] = dummy;
00609 doms_to_fix[1] = bb;
00610 iterate_fix_dominators (CDI_DOMINATORS, doms_to_fix, 2);
00611 }
00612
00613 cfg_hooks->make_forwarder_block (fallthru);
00614
00615 return fallthru;
00616 }
00617
00618 void
00619 tidy_fallthru_edge (edge e)
00620 {
00621 if (cfg_hooks->tidy_fallthru_edge)
00622 cfg_hooks->tidy_fallthru_edge (e);
00623 }
00624
00625
00626
00627
00628
00629
00630 void
00631 tidy_fallthru_edges (void)
00632 {
00633 basic_block b, c;
00634
00635 if (!cfg_hooks->tidy_fallthru_edge)
00636 return;
00637
00638 if (ENTRY_BLOCK_PTR->next_bb == EXIT_BLOCK_PTR)
00639 return;
00640
00641 FOR_BB_BETWEEN (b, ENTRY_BLOCK_PTR->next_bb, EXIT_BLOCK_PTR->prev_bb, next_bb)
00642 {
00643 edge s;
00644
00645 c = b->next_bb;
00646
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656
00657
00658
00659 if (single_succ_p (b))
00660 {
00661 s = single_succ_edge (b);
00662 if (! (s->flags & EDGE_COMPLEX)
00663 && s->dest == c
00664 && !find_reg_note (BB_END (b), REG_CROSSING_JUMP, NULL_RTX))
00665 tidy_fallthru_edge (s);
00666 }
00667 }
00668 }
00669
00670
00671
00672 bool
00673 can_duplicate_block_p (basic_block bb)
00674 {
00675 edge e;
00676
00677 if (!cfg_hooks->can_duplicate_block_p)
00678 internal_error ("%s does not support can_duplicate_block_p",
00679 cfg_hooks->name);
00680
00681 if (bb == EXIT_BLOCK_PTR || bb == ENTRY_BLOCK_PTR)
00682 return false;
00683
00684
00685
00686 e = find_edge (bb, EXIT_BLOCK_PTR);
00687 if (e && (e->flags & EDGE_FALLTHRU))
00688 return false;
00689
00690 return cfg_hooks->can_duplicate_block_p (bb);
00691 }
00692
00693
00694
00695
00696
00697 basic_block
00698 duplicate_block (basic_block bb, edge e, basic_block after)
00699 {
00700 edge s, n;
00701 basic_block new_bb;
00702 gcov_type new_count = e ? e->count : 0;
00703 edge_iterator ei;
00704
00705 if (!cfg_hooks->duplicate_block)
00706 internal_error ("%s does not support duplicate_block",
00707 cfg_hooks->name);
00708
00709 if (bb->count < new_count)
00710 new_count = bb->count;
00711
00712 #ifdef ENABLE_CHECKING
00713 gcc_assert (can_duplicate_block_p (bb));
00714 #endif
00715
00716 new_bb = cfg_hooks->duplicate_block (bb);
00717 if (after)
00718 move_block_after (new_bb, after);
00719
00720 new_bb->loop_depth = bb->loop_depth;
00721 new_bb->flags = bb->flags;
00722 FOR_EACH_EDGE (s, ei, bb->succs)
00723 {
00724
00725
00726
00727 n = unchecked_make_edge (new_bb, s->dest, s->flags);
00728 n->probability = s->probability;
00729 if (e && bb->count)
00730 {
00731
00732 n->count = s->count * (new_count * 10000 / bb->count) / 10000;
00733 s->count -= n->count;
00734 }
00735 else
00736 n->count = s->count;
00737 n->aux = s->aux;
00738 }
00739
00740 if (e)
00741 {
00742 new_bb->count = new_count;
00743 bb->count -= new_count;
00744
00745 new_bb->frequency = EDGE_FREQUENCY (e);
00746 bb->frequency -= EDGE_FREQUENCY (e);
00747
00748 redirect_edge_and_branch_force (e, new_bb);
00749
00750 if (bb->count < 0)
00751 bb->count = 0;
00752 if (bb->frequency < 0)
00753 bb->frequency = 0;
00754 }
00755 else
00756 {
00757 new_bb->count = bb->count;
00758 new_bb->frequency = bb->frequency;
00759 }
00760
00761 set_bb_original (new_bb, bb);
00762 set_bb_copy (bb, new_bb);
00763
00764 return new_bb;
00765 }
00766
00767
00768
00769
00770 bool
00771 block_ends_with_call_p (basic_block bb)
00772 {
00773 if (!cfg_hooks->block_ends_with_call_p)
00774 internal_error ("%s does not support block_ends_with_call_p", cfg_hooks->name);
00775
00776 return (cfg_hooks->block_ends_with_call_p) (bb);
00777 }
00778
00779
00780
00781 bool
00782 block_ends_with_condjump_p (basic_block bb)
00783 {
00784 if (!cfg_hooks->block_ends_with_condjump_p)
00785 internal_error ("%s does not support block_ends_with_condjump_p",
00786 cfg_hooks->name);
00787
00788 return (cfg_hooks->block_ends_with_condjump_p) (bb);
00789 }
00790
00791
00792
00793
00794
00795
00796
00797
00798
00799 int
00800 flow_call_edges_add (sbitmap blocks)
00801 {
00802 if (!cfg_hooks->flow_call_edges_add)
00803 internal_error ("%s does not support flow_call_edges_add",
00804 cfg_hooks->name);
00805
00806 return (cfg_hooks->flow_call_edges_add) (blocks);
00807 }
00808
00809
00810
00811
00812 void
00813 execute_on_growing_pred (edge e)
00814 {
00815 if (cfg_hooks->execute_on_growing_pred)
00816 cfg_hooks->execute_on_growing_pred (e);
00817 }
00818
00819
00820
00821
00822 void
00823 execute_on_shrinking_pred (edge e)
00824 {
00825 if (cfg_hooks->execute_on_shrinking_pred)
00826 cfg_hooks->execute_on_shrinking_pred (e);
00827 }
00828
00829
00830
00831
00832 void
00833 lv_flush_pending_stmts (edge e)
00834 {
00835 if (cfg_hooks->flush_pending_stmts)
00836 cfg_hooks->flush_pending_stmts (e);
00837 }
00838
00839
00840
00841
00842
00843
00844
00845
00846 bool
00847 cfg_hook_duplicate_loop_to_header_edge (struct loop *loop, edge e,
00848 struct loops *loops, unsigned int ndupl,
00849 sbitmap wont_exit, edge orig,
00850 edge *to_remove,
00851 unsigned int *n_to_remove, int flags)
00852 {
00853 gcc_assert (cfg_hooks->cfg_hook_duplicate_loop_to_header_edge);
00854 return cfg_hooks->cfg_hook_duplicate_loop_to_header_edge (loop, e, loops,
00855 ndupl, wont_exit,
00856 orig, to_remove,
00857 n_to_remove, flags);
00858 }
00859
00860
00861
00862
00863
00864 void
00865 extract_cond_bb_edges (basic_block b, edge *e1, edge *e2)
00866 {
00867 gcc_assert (cfg_hooks->extract_cond_bb_edges);
00868 cfg_hooks->extract_cond_bb_edges (b, e1, e2);
00869 }
00870
00871
00872
00873 void
00874 lv_adjust_loop_header_phi (basic_block first, basic_block second,
00875 basic_block new, edge e)
00876 {
00877 if (cfg_hooks->lv_adjust_loop_header_phi)
00878 cfg_hooks->lv_adjust_loop_header_phi (first, second, new, e);
00879 }
00880
00881
00882
00883
00884 void
00885 lv_add_condition_to_bb (basic_block first, basic_block second,
00886 basic_block new, void *cond)
00887 {
00888 gcc_assert (cfg_hooks->lv_add_condition_to_bb);
00889 cfg_hooks->lv_add_condition_to_bb (first, second, new, cond);
00890 }