case OP_LOADI2_MEMBASE:
printf ("[%s] <- [%s + 0x%x]", mono_arch_regname (tree->dreg), mono_arch_regname (tree->inst_basereg), (int)tree->inst_offset);
break;
- case CEE_BR:
+ case OP_BR:
case OP_CALL_HANDLER:
printf ("[B%d]", tree->inst_target_bb->block_num);
break;
} else {
MonoAliasType father_type = MONO_ALIASING_TYPE_NO_ALIAS;
if ((context.subtree_aliases [0].type == MONO_ALIASING_TYPE_LOCAL) || (context.subtree_aliases [0].type == MONO_ALIASING_TYPE_LOCAL_FIELD)) {
+ MonoAliasUsageInformation *use = mono_mempool_alloc (info->mempool, sizeof (MonoAliasUsageInformation));
+
+ inst->ssa_op = MONO_SSA_INDIRECT_LOAD_STORE;
+ use->inst = inst;
+ use->affected_variables = &(info->variables [context.subtree_aliases [0].variable_index]);
+ APPEND_USE (info, bb_info, use);
ADD_BAD_ALIAS (info, context.subtree_aliases [0].variable_index);
}
if ((context.subtree_aliases [1].type == MONO_ALIASING_TYPE_LOCAL) || (context.subtree_aliases [1].type == MONO_ALIASING_TYPE_LOCAL_FIELD)) {
+ MonoAliasUsageInformation *use = mono_mempool_alloc (info->mempool, sizeof (MonoAliasUsageInformation));
+
+ inst->ssa_op = MONO_SSA_INDIRECT_LOAD_STORE;
+ use->inst = inst;
+ use->affected_variables = &(info->variables [context.subtree_aliases [1].variable_index]);
+ APPEND_USE (info, bb_info, use);
ADD_BAD_ALIAS (info, context.subtree_aliases [1].variable_index);
}
if (father_alias != NULL) {
}
}
+#if 0
static MonoLocalVariableList*
mono_aliasing_get_affected_variables_for_inst_in_bb (MonoAliasingInformation *info, MonoInst *inst, MonoBasicBlock *bb) {
MonoAliasUsageInformation *use;
g_assert_not_reached ();
return NULL;
}
+#endif
MonoLocalVariableList*
mono_aliasing_get_affected_variables_for_inst (MonoAliasingInformation *info, MonoInst *inst) {
arity = mono_burg_arity [inst->opcode];
- if (OP_IS_CALL (inst->opcode)) {
- has_side_effects = TRUE;
- } else {
+ switch (inst->opcode) {
+#define OPDEF(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) case a1:
+#include "simple-cee-ops.h"
+#undef OPDEF
+#define MINI_OP(a1,a2) case a1:
+#include "simple-mini-ops.h"
+#undef MINI_OP
has_side_effects = FALSE;
+ break;
+ default:
+ has_side_effects = TRUE;
}
if (arity) {
printf ("KILLING slot %d at inst ", affected_variable->variable_index);
mono_print_tree_nl (inst);
}
- possibly_dead_assignments [affected_variable->variable_index]->opcode = CEE_NOP;
+ possibly_dead_assignments [affected_variable->variable_index]->opcode = OP_NOP;
possibly_dead_assignments [affected_variable->variable_index]->ssa_op = MONO_SSA_NOP;
possibly_dead_assignments [affected_variable->variable_index] = NULL;
}
for (inst = bb->code; inst != NULL; inst = inst->next) {
mono_aliasing_deadce_on_inst (info, possibly_dead_assignments, inst);
- if (inst->opcode == CEE_JMP) {
+ if (inst->opcode == OP_JMP) {
/* Keep arguments live! */
for (variable_index = 0; variable_index < cfg->num_varinfo; variable_index++) {
if (cfg->varinfo [variable_index]->opcode == OP_ARG) {
//printf ("FAST DEADCE DEAD LOCAL\n");
- possibly_dead_assignments [variable_index]->opcode = CEE_NOP;
+ possibly_dead_assignments [variable_index]->opcode = OP_NOP;
possibly_dead_assignments [variable_index]->ssa_op = MONO_SSA_NOP;
}
}