[Mono-list] Regarding MonoBURG

nkavv at physics.auth.gr nkavv at physics.auth.gr
Sun May 14 21:05:48 EDT 2006


Hi there

i'm currently studying the monoburg sourcecode, from both versions:

1. the Mono project version (monoburg.c,monoburg.h) files
2. monoburg-1.0.5 at http://www.lrde.epita.fr/cgi-bin/twiki/view/Tiger/MonoBURG

it seems that monoburg-1.0.5 has completed support for "dag_mode".

I think i have misunderstood what does the following form of "affiliated trees"
mean (example from ARM instruction selector:


stmt: CEE_STIND_I (OP_REGVAR, CEE_SUB (CEE_LDIND_I (OP_REGVAR), OP_ICONST)),
stmt: CEE_STIND_I4 (OP_REGVAR, CEE_SUB (CEE_LDIND_I4 (OP_REGVAR), OP_ICONST)),
stmt: CEE_STIND_I (OP_REGVAR, CEE_ADD (CEE_LDIND_I (OP_REGVAR), OP_ICONST)),
stmt: CEE_STIND_I4 (OP_REGVAR, CEE_ADD (CEE_LDIND_I4 (OP_REGVAR), OP_ICONST)) {
	int con = state->right->right->tree->inst_c0;
	int dreg = state->left->tree->dreg;
	int sreg = state->right->left->left->tree->dreg;

	if (state->right->op == CEE_ADD)
		tree->opcode = OP_ADD_IMM;
	else if (state->right->op == CEE_SUB)
		tree->opcode = OP_SUB_IMM;
	else
		g_assert_not_reached ();
	tree->inst_imm = con;
	tree->sreg1 = sreg;
	tree->dreg = dreg;
	mono_bblock_add_inst (s->cbb, tree);
}

This is not a "complex" DAG pattern, but a collection of alternative trees, one
of which will eventually match. Am I right about this?

Also if monoburg-1.0.5 (is anybody using that) ***really*** has full support for
DAG matching (using MBState's and supporting multi-output patterns), can anyone
provide some example for these:

1. writing an appropriate "reduce" routine
2.  -"-      -"-          "create_dag" routine

thanks in advance
Nikolaos Kavvadias





More information about the Mono-list mailing list