aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorzadeck <zadeck@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-27 14:36:36 +0000
committerzadeck <zadeck@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-27 14:36:36 +0000
commitf65e6fbc465929c7cadb239cf25c5a9cdfe53675 (patch)
tree7bb7286ce166502374ececaf40c78ba4b365e5ee /gcc
parent111bcd7e98fb8fa81f3fa0168907e1ee33831408 (diff)
2007-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-core.c (df_hybrid_search_forward, df_hybrid_search_backward df_iterative_dataflow): Removed. * df.h (df_iterative_dataflow): Removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/dataflow-branch@125111 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog.dataflow6
-rw-r--r--gcc/df-core.c209
-rw-r--r--gcc/df.h1
3 files changed, 6 insertions, 210 deletions
diff --git a/gcc/ChangeLog.dataflow b/gcc/ChangeLog.dataflow
index 6f2c83fdf29..03555739e2b 100644
--- a/gcc/ChangeLog.dataflow
+++ b/gcc/ChangeLog.dataflow
@@ -1,5 +1,11 @@
2007-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
+ * df-core.c (df_hybrid_search_forward, df_hybrid_search_backward
+ df_iterative_dataflow): Removed.
+ * df.h (df_iterative_dataflow): Removed.
+
+2007-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
+
* dse.c (replace_inc_dec, delete_dead_store_insn, scan_insn,
dse_record_singleton_alias_set, dse_confluence_0,
dse_confluence_n, step4, step5_nospill, step5_spill,
diff --git a/gcc/df-core.c b/gcc/df-core.c
index 46d76f63453..ff5d3ff7768 100644
--- a/gcc/df-core.c
+++ b/gcc/df-core.c
@@ -848,139 +848,6 @@ struct tree_opt_pass pass_df_finish =
----------------------------------------------------------------------------*/
-/* Hybrid search algorithm from "Implementation Techniques for
- Efficient Data-Flow Analysis of Large Programs"
- by Darren C. Atkinson, William G. Griswold. */
-
-static void
-df_hybrid_search_forward (basic_block bb,
- sbitmap pending,
- sbitmap visited,
- sbitmap considered,
- struct dataflow *dataflow)
-{
- int result_changed;
- int i = bb->index;
- edge e;
- edge_iterator ei;
-
- SET_BIT (visited, i);
- gcc_assert (TEST_BIT (pending, i));
- RESET_BIT (pending, i);
-
- /* Calculate <conf_op> of predecessor_outs. */
- if (EDGE_COUNT (bb->preds) > 0)
- FOR_EACH_EDGE (e, ei, bb->preds)
- {
- if (!TEST_BIT (considered, e->src->index))
- continue;
-
- dataflow->problem->con_fun_n (e);
- }
- else if (dataflow->problem->con_fun_0)
- dataflow->problem->con_fun_0 (bb);
-
- result_changed = dataflow->problem->trans_fun (i);
-
- if (!result_changed)
- return;
-
- FOR_EACH_EDGE (e, ei, bb->succs)
- {
- if (e->dest->index == i)
- continue;
- if (!TEST_BIT (considered, e->dest->index))
- continue;
- SET_BIT (pending, e->dest->index);
- }
-
- /* This loop below defeats the reverse postorder traversal completely,
- because on the first block of the CFG,
- this code visits the block by the DFS order
- all the way down to the bottom. */
- FOR_EACH_EDGE (e, ei, bb->succs)
- {
- if (e->dest->index == i)
- continue;
-
- if (!TEST_BIT (considered, e->dest->index))
- continue;
-
- if (!TEST_BIT (visited, e->dest->index))
- df_hybrid_search_forward (e->dest,
- pending,
- visited,
- considered,
- dataflow);
- }
-}
-
-static void
-df_hybrid_search_backward (basic_block bb,
- sbitmap pending,
- sbitmap visited,
- sbitmap considered,
- struct dataflow *dataflow)
-{
- int result_changed;
- int i = bb->index;
- edge e;
- edge_iterator ei;
-
- SET_BIT (visited, i);
- gcc_assert (TEST_BIT (pending, i));
- RESET_BIT (pending, i);
-
- /* Calculate <conf_op> of predecessor_outs. */
- if (EDGE_COUNT (bb->succs) > 0)
- FOR_EACH_EDGE (e, ei, bb->succs)
- {
- if (!TEST_BIT (considered, e->dest->index))
- continue;
-
- dataflow->problem->con_fun_n (e);
- }
- else if (dataflow->problem->con_fun_0)
- dataflow->problem->con_fun_0 (bb);
-
- result_changed = dataflow->problem->trans_fun (i);
-
- if (!result_changed)
- return;
-
- FOR_EACH_EDGE (e, ei, bb->preds)
- {
- if (e->src->index == i)
- continue;
-
- if (!TEST_BIT (considered, e->src->index))
- continue;
-
- SET_BIT (pending, e->src->index);
- }
-
- /* This loop below defeats the reverse postorder traversal completely,
- because on the first block of the CFG,
- this code visits the block by the DFS order
- all the way down to the bottom. */
- FOR_EACH_EDGE (e, ei, bb->preds)
- {
- if (e->src->index == i)
- continue;
-
- if (!TEST_BIT (considered, e->src->index))
- continue;
-
- if (!TEST_BIT (visited, e->src->index))
- df_hybrid_search_backward (e->src,
- pending,
- visited,
- considered,
- dataflow);
- }
-}
-
-
/* Helper function for df_worklist_dataflow.
Propagate the dataflow forward.
Given a BB_INDEX, do the dataflow propagation
@@ -1142,82 +1009,6 @@ df_worklist_dataflow (struct dataflow *dataflow,
}
-/* This function will perform iterative bitvector dataflow described
- by DATAFLOW, producing the in and out sets. Only the part of the
- cfg induced by blocks in DATAFLOW->order is taken into account. */
-
-void
-df_iterative_dataflow (struct dataflow *dataflow,
- bitmap blocks_to_consider,
- int *blocks_in_postorder, int n_blocks)
-{
- unsigned int idx;
- int i;
- sbitmap visited = sbitmap_alloc (last_basic_block);
- sbitmap pending = sbitmap_alloc (last_basic_block);
- sbitmap considered = sbitmap_alloc (last_basic_block);
- bitmap_iterator bi;
-
- sbitmap_zero (visited);
- sbitmap_zero (pending);
- sbitmap_zero (considered);
-
- gcc_assert (dataflow->problem->dir);
-
- EXECUTE_IF_SET_IN_BITMAP (blocks_to_consider, 0, idx, bi)
- {
- SET_BIT (considered, idx);
- }
-
- for (i = 0; i < n_blocks; i++)
- {
- idx = blocks_in_postorder[i];
- SET_BIT (pending, idx);
- }
-
- dataflow->problem->init_fun (blocks_to_consider);
-
- while (1)
- {
- /* For forward problems, you want to pass in reverse postorder
- and for backward problems you want postorder. This has been
- shown to be as good as you can do by several people, the
- first being Mathew Hecht in his phd dissertation.
-
- The nodes are passed into this function in postorder. */
-
- for (i = 0; i < n_blocks; i++)
- {
- idx = blocks_in_postorder[i];
-
- if (TEST_BIT (pending, idx) && !TEST_BIT (visited, idx))
- {
- if (dataflow->problem->dir == DF_FORWARD)
- df_hybrid_search_forward (BASIC_BLOCK (idx),
- pending,
- visited,
- considered,
- dataflow);
- else
- df_hybrid_search_backward (BASIC_BLOCK (idx),
- pending,
- visited,
- considered,
- dataflow);
- }
- }
- if (sbitmap_first_set_bit (pending) == -1)
- break;
-
- sbitmap_zero (visited);
- }
-
- sbitmap_free (pending);
- sbitmap_free (visited);
- sbitmap_free (considered);
-}
-
-
/* Remove the entries not in BLOCKS from the LIST of length LEN, preserving
the order of the remaining entries. Returns the length of the resulting
list. */
diff --git a/gcc/df.h b/gcc/df.h
index f4ea05855a5..80b257e085a 100644
--- a/gcc/df.h
+++ b/gcc/df.h
@@ -845,7 +845,6 @@ extern struct df_ref *df_find_def (rtx, rtx);
extern bool df_reg_defined (rtx, rtx);
extern struct df_ref *df_find_use (rtx, rtx);
extern bool df_reg_used (rtx, rtx);
-extern void df_iterative_dataflow (struct dataflow *,bitmap, int *, int);
extern void df_worklist_dataflow (struct dataflow *,bitmap, int *, int);
extern void df_print_regset (FILE *file, bitmap r);
extern void df_dump (FILE *);