Skip to content

Commit

Permalink
set KNOWN_BOX_SRC on all the native ref ops in fact discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed May 5, 2016
1 parent 1088538 commit 3181590
Showing 1 changed file with 36 additions and 9 deletions.
45 changes: 36 additions & 9 deletions src/spesh/facts.c
Expand Up @@ -540,58 +540,85 @@ static void add_bb_facts(MVMThreadContext *tc, MVMSpeshGraph *g, MVMSpeshBB *bb,
case MVM_OP_getregref_u16:
case MVM_OP_getlexref_u16:
case MVM_OP_getregref_u8:
case MVM_OP_getlexref_u8:
case MVM_OP_getlexref_u8: {
MVMSpeshFacts *target_facts = &(g->facts[ins->operands[0].reg.orig][ins->operands[0].reg.i]);
create_facts_with_type(tc, g,
ins->operands[0].reg.orig, ins->operands[0].reg.i,
g->sf->body.cu->body.hll_config->int_lex_ref);
target_facts->flags |= MVM_SPESH_FACT_KNOWN_BOX_SRC;
break;
}
case MVM_OP_getregref_n:
case MVM_OP_getlexref_n:
case MVM_OP_getregref_n32:
case MVM_OP_getlexref_n32:
case MVM_OP_getlexref_n32: {
MVMSpeshFacts *target_facts = &(g->facts[ins->operands[0].reg.orig][ins->operands[0].reg.i]);
create_facts_with_type(tc, g,
ins->operands[0].reg.orig, ins->operands[0].reg.i,
g->sf->body.cu->body.hll_config->num_lex_ref);
target_facts->flags |= MVM_SPESH_FACT_KNOWN_BOX_SRC;
break;
}
case MVM_OP_getregref_s:
case MVM_OP_getlexref_s:
case MVM_OP_getlexref_s: {
MVMSpeshFacts *target_facts = &(g->facts[ins->operands[0].reg.orig][ins->operands[0].reg.i]);
create_facts_with_type(tc, g,
ins->operands[0].reg.orig, ins->operands[0].reg.i,
g->sf->body.cu->body.hll_config->str_lex_ref);
target_facts->flags |= MVM_SPESH_FACT_KNOWN_BOX_SRC;
break;
}
case MVM_OP_getattrref_i:
case MVM_OP_getattrsref_i:
case MVM_OP_getattrsref_i: {
MVMSpeshFacts *target_facts = &(g->facts[ins->operands[0].reg.orig][ins->operands[0].reg.i]);
create_facts_with_type(tc, g,
ins->operands[0].reg.orig, ins->operands[0].reg.i,
g->sf->body.cu->body.hll_config->int_attr_ref);
target_facts->flags |= MVM_SPESH_FACT_KNOWN_BOX_SRC;
break;
}
case MVM_OP_getattrref_n:
case MVM_OP_getattrsref_n:
case MVM_OP_getattrsref_n: {
MVMSpeshFacts *target_facts = &(g->facts[ins->operands[0].reg.orig][ins->operands[0].reg.i]);
create_facts_with_type(tc, g,
ins->operands[0].reg.orig, ins->operands[0].reg.i,
g->sf->body.cu->body.hll_config->num_attr_ref);
target_facts->flags |= MVM_SPESH_FACT_KNOWN_BOX_SRC;
break;
}
case MVM_OP_getattrref_s:
case MVM_OP_getattrsref_s:
case MVM_OP_getattrsref_s: {
MVMSpeshFacts *target_facts = &(g->facts[ins->operands[0].reg.orig][ins->operands[0].reg.i]);
create_facts_with_type(tc, g,
ins->operands[0].reg.orig, ins->operands[0].reg.i,
g->sf->body.cu->body.hll_config->str_attr_ref);
target_facts->flags |= MVM_SPESH_FACT_KNOWN_BOX_SRC;
break;
case MVM_OP_atposref_i:
}
case MVM_OP_atposref_i: {
MVMSpeshFacts *target_facts = &(g->facts[ins->operands[0].reg.orig][ins->operands[0].reg.i]);
create_facts_with_type(tc, g,
ins->operands[0].reg.orig, ins->operands[0].reg.i,
g->sf->body.cu->body.hll_config->int_pos_ref);
target_facts->flags |= MVM_SPESH_FACT_KNOWN_BOX_SRC;
break;
case MVM_OP_atposref_n:
}
case MVM_OP_atposref_n: {
MVMSpeshFacts *target_facts = &(g->facts[ins->operands[0].reg.orig][ins->operands[0].reg.i]);
create_facts_with_type(tc, g,
ins->operands[0].reg.orig, ins->operands[0].reg.i,
g->sf->body.cu->body.hll_config->num_pos_ref);
target_facts->flags |= MVM_SPESH_FACT_KNOWN_BOX_SRC;
break;
case MVM_OP_atposref_s:
}
case MVM_OP_atposref_s: {
MVMSpeshFacts *target_facts = &(g->facts[ins->operands[0].reg.orig][ins->operands[0].reg.i]);
create_facts_with_type(tc, g,
ins->operands[0].reg.orig, ins->operands[0].reg.i,
g->sf->body.cu->body.hll_config->str_pos_ref);
target_facts->flags |= MVM_SPESH_FACT_KNOWN_BOX_SRC;
break;
}

case MVM_OP_const_i64:
case MVM_OP_const_i32:
Expand Down

0 comments on commit 3181590

Please sign in to comment.