示例#1
0
文件: irgraph.c 项目: MatzeB/libfirm
void irg_set_nloc(ir_graph *res, int n_loc)
{
	assert(irg_is_constrained(res, IR_GRAPH_CONSTRAINT_CONSTRUCTION));

	/* number of local variables that are never dereferenced in this graph plus
	 * one for the store. This is not the number of parameters to the
	 * procedure! */
	res->n_loc = n_loc + 1;

	if (res->loc_descriptions) {
		free(res->loc_descriptions);
		res->loc_descriptions = NULL;
	}
}
示例#2
0
文件: beinfo.c 项目: lamproae/libfirm
/**
 * Edge hook to dump the schedule edges.
 */
static void sched_edge_hook(FILE *F, const ir_node *irn)
{
	ir_graph *irg = get_irn_irg(irn);
	if (!irg_is_constrained(irg, IR_GRAPH_CONSTRAINT_BACKEND))
		return;

	if (is_Proj(irn) || is_Block(irn) || !sched_is_scheduled(irn))
		return;

	ir_node *const prev = sched_prev(irn);
	if (!sched_is_begin(prev)) {
		fprintf(F, "edge:{sourcename: ");
		print_nodeid(F, irn);
		fprintf(F, " targetname: ");
		print_nodeid(F, prev);
		fprintf(F, " color:magenta}\n");
	}
}
示例#3
0
文件: beinfo.c 项目: lamproae/libfirm
static void dump_backend_info_hook(void *context, FILE *F, const ir_node *node)
{
	(void)context;

	ir_graph *const irg = get_irn_irg(node);
	if (!irg_is_constrained(irg, IR_GRAPH_CONSTRAINT_BACKEND))
		return;

	be_dump_reqs_and_registers(F, node);

	if (is_Block(node)) {
		be_lv_t *const lv = be_get_irg_liveness(irg);
		if (lv->sets_valid)
			be_dump_liveness_block(lv, F, node);
	}

#ifndef NDEBUG
	if (!is_Proj(node)) {
		char const *const orig = be_get_info(node)->orig_node;
		fprintf(F, "orig node = %s\n", orig ? orig : "n/a");
	}
#endif
}
示例#4
0
文件: eh.c 项目: MatzeB/liboo
void eh_start_method(void)
{
	assert (irg_is_constrained(get_current_ir_graph(), IR_GRAPH_CONSTRAINT_CONSTRUCTION));
	assert (obstack_object_size(&lpads) == 0);
	eh_new_lpad();
}
示例#5
0
文件: irgraph.c 项目: MatzeB/libfirm
void set_current_ir_graph(ir_graph *graph)
{
	assert(graph == NULL
	       || irg_is_constrained(graph, IR_GRAPH_CONSTRAINT_CONSTRUCTION));
	current_ir_graph = graph;
}