src/lima/gp_ir/dce.c
/* Dead Code Elimination
 *
 * Assumes SSA form.
 */
Dead Code Elimination
Assumes SSA form.
Dead Code Elimination Assumes SSA form .
static void mark_all_dead(lima_gp_ir_prog_t* prog)
{
	lima_gp_ir_block_t* block;
	gp_ir_prog_for_each_block(prog, block)
	{
		lima_gp_ir_phi_node_t* phi_node;
		ptrset_iter_t iter = ptrset_iter_create(block->phi_nodes);
		ptrset_iter_for_each(iter, phi_node)
		{
			phi_node->is_dead = true;
		}
		lima_gp_ir_root_node_t* root_node;
		gp_ir_block_for_each_node(block, root_node)
		{
			root_node->is_dead = true;
		}
	}
}
static void mark_all_dead ( lima_gp_ir_prog_t * prog ) { lima_gp_ir_block_t * block ; gp_ir_prog_for_each_block ( prog , block ) { lima_gp_ir_phi_node_t * phi_node ; ptrset_iter_t iter = ptrset_iter_create ( block -> phi_nodes ) ; ptrset_iter_for_each ( iter , phi_node ) { phi_node -> is_dead = true ; } lima_gp_ir_root_node_t * root_node ; gp_ir_block_for_each_node ( block , root_node ) { root_node -> is_dead = true ; } } }
Dead Code Elimination
 Assumes SSA form.
Dead Code Elimination Assumes SSA form .