diff options
author | Daniel Berlin <dberlin@dberlin.org> | 2005-12-17 13:40:27 +0000 |
---|---|---|
committer | Kenneth Zadeck <zadeck@gcc.gnu.org> | 2005-12-17 13:40:27 +0000 |
commit | 24bd1a0b27fc7ea64a1bec8eca37abc13cff4178 (patch) | |
tree | 9df368d8d09a4cf8e6f2a79bb6e4864ceb6a4907 /gcc/cfghooks.c | |
parent | 86051306a1a4da9a1fb5da12325cac62cd4ca883 (diff) | |
download | gcc-24bd1a0b27fc7ea64a1bec8eca37abc13cff4178.zip gcc-24bd1a0b27fc7ea64a1bec8eca37abc13cff4178.tar.gz gcc-24bd1a0b27fc7ea64a1bec8eca37abc13cff4178.tar.bz2 |
basic-block.h: Changed basic block numbering so that the entry block is 0 and the exit block is 1.
2005-12-17 Danny Berlin <dberlin@dberlin.org>
Kenneth Zadeck <zadeck@naturalbridge.com>
* basic-block.h: Changed basic block numbering so that the entry
block is 0 and the exit block is 1. Changed insn iterators so
that they are tolerant of blocks with no insns.
* regrename.c (copyprop_hardreg_forward): Changed basic block
numbering so that the entry block is 0 and the exit block is 1.
* sched-ebb.c (sehedule_ebbs): Ditto.
* tracer.c (branch_ratio_cutoff): Ditto.
* cfgloopmanip.c (fix_loop_structure): Ditto.
* cfghooks.c (verify_flow_info): Ditto.
* cfg.c (compact_blocks): Ditto.
* reorg.c (dbr_schedule): Ditto.
* flow.c (calculate_global_regs_live, libcall_dead_p): Ditto.
* dominance.c (calc_dfs_tree_nonrec, calc_dfs_tree,
calculate_dominance_info): Ditto.
* cfganal.c (create_edge_list, print_edge_list,
flow_depth_first_order_compute, flow_dfs_compute_reverse_init,
flow_dfs_compute_reverse_add_bb, flow_dfs_compute_reverse_execute,
dfs_enumerate_from): Ditto.
* global.c (global_alloc, set_up_bb_rts_numbers): Ditto.
* ifcvt.c (find_if_case_2): Ditto.
* cfgbuild.c (control_flow_insn_p, count_basic_blocks,
find_basic_blocks): Ditto.
* predict.c (predict_loops, tree_bb_level_predictions,
predict_paths_leading_to, propagate_freq): Ditto.
* lcm.c (compute_antinout_edge, compute_laterin,
compute_available): Ditto.
* function.c (thread_prologue_and_epilogue_insns): Ditto.
* gcse.c (gcse_main, bypass_jumps): Ditto.
* profile.c (compute_branch_probabilities,
compute_value_histograms, branch_prob): Ditto.
* tree-flow-inline.h (bsi_start, bsi_after_labels,
bsi_last): Ditto.
* tree-ssa-phiopt.c (tree_ssa_phiopt,
blocks_in_phiopt_order): Ditto.
* bt-load.c (compute_defs_uses_and_gen, compute_kill,
compute_out, link_btr_uses, migrate_btr_defs): Ditto.
* tree-dfa.c (collect_dfa_stats): Ditto.
* cfgcleanup.c (try_forward_edges, try_optimize_cfg): Ditto.
* cfglayout.c (fixup_reorder_chain): Ditto.
* bb-reorder.c (reorder_basic_blocks, duplicate_computed_gotos,
partition_hot_cold_basic_blocks): Ditto.
* var-tracking.c (vt_find_locations): Ditto.
* cfgloop.c (flow_loops_cfg_dump, flow_loops_find, get_loop_body): Ditto.
* sched-rgn.c (compute_trg_info, init_regions, schedule_insns): Ditto.
* tree-cfg.c (init_empty_tree_cfg, build_tree_cfg, make_edges
label_to_block_fn, print_loop_ir, tree_flow_call_edges_add): Ditto.
* tree-ssa-reassoc.c (init_reassoc): Ditto.
* cfgrtl.c (entry_of_function, rtl_verify_flow_info,
rtl_flow_call_edges_add, rtl_flow_call_edges_add): Ditto.
* df.c (df_analyze_1, hybrid_search, iterative_dataflow): Ditto
and removed unused reverse orders.
* df.h (): Ditto.
* combine.c: Fix document typo.
Co-Authored-By: Kenneth Zadeck <zadeck@naturalbridge.com>
From-SVN: r108713
Diffstat (limited to 'gcc/cfghooks.c')
-rw-r--r-- | gcc/cfghooks.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c index 138bc4a..a42e4d7 100644 --- a/gcc/cfghooks.c +++ b/gcc/cfghooks.c @@ -77,8 +77,8 @@ verify_flow_info (void) basic_block *last_visited; timevar_push (TV_CFG_VERIFY); - last_visited = xcalloc (last_basic_block + 2, sizeof (basic_block)); - edge_checksum = xcalloc (last_basic_block + 2, sizeof (size_t)); + last_visited = xcalloc (last_basic_block, sizeof (basic_block)); + edge_checksum = xcalloc (last_basic_block, sizeof (size_t)); /* Check bb chain & numbers. */ last_bb_seen = ENTRY_BLOCK_PTR; @@ -122,7 +122,7 @@ verify_flow_info (void) } FOR_EACH_EDGE (e, ei, bb->succs) { - if (last_visited [e->dest->index + 2] == bb) + if (last_visited [e->dest->index] == bb) { error ("verify_flow_info: Duplicate edge %i->%i", e->src->index, e->dest->index); @@ -141,7 +141,7 @@ verify_flow_info (void) err = 1; } - last_visited [e->dest->index + 2] = bb; + last_visited [e->dest->index] = bb; if (e->flags & EDGE_FALLTHRU) n_fallthru++; @@ -158,7 +158,7 @@ verify_flow_info (void) err = 1; } - edge_checksum[e->dest->index + 2] += (size_t) e; + edge_checksum[e->dest->index] += (size_t) e; } if (n_fallthru > 1) { @@ -192,7 +192,7 @@ verify_flow_info (void) err = 1; } - edge_checksum[e->dest->index + 2] -= (size_t) e; + edge_checksum[e->dest->index] -= (size_t) e; } } @@ -202,14 +202,14 @@ verify_flow_info (void) edge_iterator ei; FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs) - edge_checksum[e->dest->index + 2] += (size_t) e; + edge_checksum[e->dest->index] += (size_t) e; FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds) - edge_checksum[e->dest->index + 2] -= (size_t) e; + edge_checksum[e->dest->index] -= (size_t) e; } FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb) - if (edge_checksum[bb->index + 2]) + if (edge_checksum[bb->index]) { error ("basic block %i edge lists are corrupted", bb->index); err = 1; |