Пример #1
0
bool lima_gp_ir_dep_info_insert(lima_gp_ir_dep_info_t* dep_info)
{
	if (!ptrset_add(&dep_info->pred->succs, dep_info))
		return false;
	if (!ptrset_add(&dep_info->succ->preds, dep_info))
		return false;
	return true;
}
Пример #2
0
void gp_ir_visitor::insert_phi(ir_phi* ir, unsigned num_sources)
{
	lima_gp_ir_phi_node_t* phi = lima_gp_ir_phi_node_create(num_sources);
	lima_gp_ir_reg_t* dest = lima_gp_ir_reg_create(this->prog);
	dest->size = ir->dest->type->vector_elements;
	phi->dest = dest;
	_mesa_hash_table_insert(this->var_to_reg, _mesa_hash_pointer(ir->dest),
							ir->dest, dest);
	_mesa_hash_table_insert(this->phi_to_phi, _mesa_hash_pointer(ir), ir, phi);
	ptrset_add(&this->cur_block->phi_nodes, phi);
}
Пример #3
0
void
gds_lib_add_struct(gds_lib_t *lib, gds_struct_t *str) {
	assert(lib && str);
	if (ptrset_add(&lib->structs, str))
		gds_struct_ref(str);
}
Пример #4
0
	pp_hir_prog_for_each_block(prog, block)
	{
		if (block->imm_dominator && block->imm_dominator != block)
			ptrset_add(&block->imm_dominator->dom_tree_children, block);
	}