aboutsummaryrefslogtreecommitdiff
path: root/gcc/predict.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2005-05-27 22:06:46 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2005-05-27 22:06:46 +0000
commit4aab792de6d092becf03e1d23f74a1ec2047fc27 (patch)
treee30578252db88291c4c33444ffad40db62dca180 /gcc/predict.c
parent8dabce9822f03c6d612f1a14bf67fe83498e0ab4 (diff)
downloadgcc-4aab792de6d092becf03e1d23f74a1ec2047fc27.zip
gcc-4aab792de6d092becf03e1d23f74a1ec2047fc27.tar.gz
gcc-4aab792de6d092becf03e1d23f74a1ec2047fc27.tar.bz2
basic-block.h (basic_block_def): Add phi_nodes and predictions.
* basic-block.h (basic_block_def): Add phi_nodes and predictions. Remove tree_annotations. * predict.c (tree_predicted_by_p, tree_predict_edge, combine_predictions_for_bb): Adjust references to predictions. * tree-cfg.c (init_empty_tree_cfg, create_bb): Don't call create_block_annotation. (create_block_annotation, free_blocks_annotatios, clear_blocks_annotations): Remove. (dump_cfg_stats): Don't print out the memory spent on bb_ann_d. (delete_tree_cfg_annotations): Don't call free_blocks_annotations. * tree-flow-inline.h (bb_ann): Remove. (phi_nodes, set_phi_nodes): Update references to phi_nodes. * tree-flow.h (bb_ann_d): Remove. * tree-if-conv.c (process_phi_nodes): Update a reference to phi_nodes. * tree-phinodes.c (reserve_phi_args_for_new_edge, create_phi_node, remove_phi_node): Likewise. * tree-pretty-print.c (dump_generic_bb_buff): Don't call bb_ann. * tree-ssa-dom.c (threaded_blocks): New. (tree_ssa_dominator_optimize): Initialize, clear, and free threaded_blocks. Update a call to thread_through_all_blocks. (thread_across_edge): Use threaded_blocks instead of setting incoming_edge_threaded. * tree-ssa-threadupdate.c (threaded_through_all_blocks): Take a bitmap of blocks that are threaded through. * tree.h: Move the prototype of threaded_through_blocks to tree-flow.h. From-SVN: r100279
Diffstat (limited to 'gcc/predict.c')
-rw-r--r--gcc/predict.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/predict.c b/gcc/predict.c
index 961a395..25f97f7 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -171,8 +171,8 @@ rtl_predicted_by_p (basic_block bb, enum br_predictor predictor)
bool
tree_predicted_by_p (basic_block bb, enum br_predictor predictor)
{
- struct edge_prediction *i = bb_ann (bb)->predictions;
- for (i = bb_ann (bb)->predictions; i; i = i->next)
+ struct edge_prediction *i;
+ for (i = bb->predictions; i; i = i->next)
if (i->predictor == predictor)
return true;
return false;
@@ -233,8 +233,8 @@ tree_predict_edge (edge e, enum br_predictor predictor, int probability)
{
struct edge_prediction *i = ggc_alloc (sizeof (struct edge_prediction));
- i->next = bb_ann (e->src)->predictions;
- bb_ann (e->src)->predictions = i;
+ i->next = e->src->predictions;
+ e->src->predictions = i;
i->probability = probability;
i->predictor = predictor;
i->edge = e;
@@ -488,7 +488,7 @@ combine_predictions_for_bb (FILE *file, basic_block bb)
{
if (!bb->count)
set_even_probabilities (bb);
- bb_ann (bb)->predictions = NULL;
+ bb->predictions = NULL;
if (file)
fprintf (file, "%i edges in bb %i predicted to even probabilities\n",
nedges, bb->index);
@@ -500,7 +500,7 @@ combine_predictions_for_bb (FILE *file, basic_block bb)
/* We implement "first match" heuristics and use probability guessed
by predictor with smallest index. */
- for (pred = bb_ann (bb)->predictions; pred; pred = pred->next)
+ for (pred = bb->predictions; pred; pred = pred->next)
{
int predictor = pred->predictor;
int probability = pred->probability;
@@ -546,7 +546,7 @@ combine_predictions_for_bb (FILE *file, basic_block bb)
combined_probability = best_probability;
dump_prediction (file, PRED_COMBINED, combined_probability, bb, true);
- for (pred = bb_ann (bb)->predictions; pred; pred = pred->next)
+ for (pred = bb->predictions; pred; pred = pred->next)
{
int predictor = pred->predictor;
int probability = pred->probability;
@@ -556,7 +556,7 @@ combine_predictions_for_bb (FILE *file, basic_block bb)
dump_prediction (file, predictor, probability, bb,
!first_match || best_predictor == predictor);
}
- bb_ann (bb)->predictions = NULL;
+ bb->predictions = NULL;
if (!bb->count)
{