Browse files

Convey spesh facts better in p6decontrv.

This allows spesh, when it knows (or has guarded on) the return type
already, to toss the return type checks entirely. This also boots out
the Nil checking and error handling basic blocks, shortening the
specialized bytecode by a couple of basic blocks, or approximately
12 instructions, which will in turn help bring more things under the
inline limit.
  • Loading branch information...
jnthn committed Jun 14, 2017
1 parent 8ff980e commit 7edf9da6b65758f5d69617cdbf892135ad8e4074
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/vm/moar/ops/perl6_ops.c
@@ -366,8 +366,12 @@ static void p6decontrv(MVMThreadContext *tc, MVMuint8 *cur_op) {
static void p6decontrv_spesh(MVMThreadContext *tc, MVMSpeshGraph *g, MVMSpeshBB *bb, MVMSpeshIns *ins) {
/* If it's already deconted, can just become a set. */
MVMSpeshFacts *obj_facts = MVM_spesh_get_and_use_facts(tc, g, ins->operands[1]);
MVMSpeshFacts *res_facts = MVM_spesh_get_facts(tc, g, ins->operands[0]);
ins->info = MVM_op_get_op(MVM_OP_set);
res_facts->flags = obj_facts->flags;
res_facts->type = obj_facts->type;
static MVMuint8 s_p6capturelex[] = {

0 comments on commit 7edf9da

Please sign in to comment.