Commit db490c39 by Kazu Hirata Committed by Kazu Hirata

tree-ssa-dce.c (EXECUTE_IF_CONTROL_DEPENDENT): Make it an iterator-style macro.

	* tree-ssa-dce.c (EXECUTE_IF_CONTROL_DEPENDENT): Make it an
	iterator-style macro.
	(mark_control_dependent_edges_necessary): Update the use of
	EXECUTE_IF_CONTROL_DEPENDENT.

From-SVN: r112089
parent f705a9a0
2006-03-15 Kazu Hirata <kazu@codesourcery.com>
* tree-ssa-dce.c (EXECUTE_IF_CONTROL_DEPENDENT): Make it an
iterator-style macro.
(mark_control_dependent_edges_necessary): Update the use of
EXECUTE_IF_CONTROL_DEPENDENT.
2006-03-15 J"orn Rennecke <joern.rennecke@st.com> 2006-03-15 J"orn Rennecke <joern.rennecke@st.com>
* config/sh/predicates.md (cache_address_operand): Special. * config/sh/predicates.md (cache_address_operand): Special.
......
...@@ -105,17 +105,12 @@ static sbitmap visited_control_parents; ...@@ -105,17 +105,12 @@ static sbitmap visited_control_parents;
to be recomputed. */ to be recomputed. */
static bool cfg_altered; static bool cfg_altered;
/* Execute CODE for each edge (given number EDGE_NUMBER within the CODE) /* Execute code that follows the macro for each edge (given number
for which the block with index N is control dependent. */ EDGE_NUMBER within the CODE) for which the block with index N is
#define EXECUTE_IF_CONTROL_DEPENDENT(N, EDGE_NUMBER, CODE) \ control dependent. */
{ \ #define EXECUTE_IF_CONTROL_DEPENDENT(BI, N, EDGE_NUMBER) \
bitmap_iterator bi; \ EXECUTE_IF_SET_IN_BITMAP (control_dependence_map[(N)], 0, \
\ (EDGE_NUMBER), (BI))
EXECUTE_IF_SET_IN_BITMAP (control_dependence_map[N], 0, EDGE_NUMBER, bi) \
{ \
CODE; \
} \
}
/* Local function prototypes. */ /* Local function prototypes. */
static inline void set_control_dependence_map_bit (basic_block, int); static inline void set_control_dependence_map_bit (basic_block, int);
...@@ -443,6 +438,7 @@ find_obviously_necessary_stmts (struct edge_list *el) ...@@ -443,6 +438,7 @@ find_obviously_necessary_stmts (struct edge_list *el)
static void static void
mark_control_dependent_edges_necessary (basic_block bb, struct edge_list *el) mark_control_dependent_edges_necessary (basic_block bb, struct edge_list *el)
{ {
bitmap_iterator bi;
unsigned edge_number; unsigned edge_number;
gcc_assert (bb != EXIT_BLOCK_PTR); gcc_assert (bb != EXIT_BLOCK_PTR);
...@@ -450,7 +446,7 @@ mark_control_dependent_edges_necessary (basic_block bb, struct edge_list *el) ...@@ -450,7 +446,7 @@ mark_control_dependent_edges_necessary (basic_block bb, struct edge_list *el)
if (bb == ENTRY_BLOCK_PTR) if (bb == ENTRY_BLOCK_PTR)
return; return;
EXECUTE_IF_CONTROL_DEPENDENT (bb->index, edge_number, EXECUTE_IF_CONTROL_DEPENDENT (bi, bb->index, edge_number)
{ {
tree t; tree t;
basic_block cd_bb = INDEX_EDGE_PRED_BB (el, edge_number); basic_block cd_bb = INDEX_EDGE_PRED_BB (el, edge_number);
...@@ -462,7 +458,7 @@ mark_control_dependent_edges_necessary (basic_block bb, struct edge_list *el) ...@@ -462,7 +458,7 @@ mark_control_dependent_edges_necessary (basic_block bb, struct edge_list *el)
t = last_stmt (cd_bb); t = last_stmt (cd_bb);
if (t && is_ctrl_stmt (t)) if (t && is_ctrl_stmt (t))
mark_stmt_necessary (t, true); mark_stmt_necessary (t, true);
}); }
} }
/* Propagate necessity using the operands of necessary statements. Process /* Propagate necessity using the operands of necessary statements. Process
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment