Permalink
Browse files

Remove register locking logic

Because we can't allocate scratch registers anyway, this is no
longer useful.
  • Loading branch information...
bdw committed May 21, 2016
1 parent 40add84 commit c9bf2fcc71d7f07eeb54abf75202f729f9cb98b1
Showing with 1 addition and 13 deletions.
  1. +0 −8 src/jit/compile.c
  2. +1 −5 src/jit/register.c
View
@@ -258,8 +258,6 @@ void MVM_jit_allocate_registers(MVMThreadContext *tc, MVMJitCompiler *compiler,
value->state == MVM_JIT_VALUE_DEAD) {
MVM_oops(tc, "Required value is not live");
}
/* Mark value as in-use */
MVM_jit_register_use(tc, compiler, value->reg_cls, value->reg_num);
}
/* allocate input register if necessary */
@@ -310,14 +308,8 @@ void MVM_jit_allocate_registers(MVMThreadContext *tc, MVMJitCompiler *compiler,
MVM_jit_register_assign(tc, compiler, value, MVM_JIT_REGCLS_GPR, reg);
}
}
MVM_jit_register_use(tc, compiler, value->reg_cls, value->reg_num);
break;
}
for (j = 0; j < tile->num_vals; j++) {
if (tile->values[j] != NULL && tile->values[j]->type == MVM_JIT_REG) {
MVM_jit_register_release(tc, compiler, tile->values[j]->reg_cls, tile->values[j]->reg_num);
}
}
/* Expire dead values */
MVM_jit_expire_values(tc, compiler, i);
}
View
@@ -359,14 +359,10 @@ void MVM_jit_expire_values(MVMThreadContext *tc, MVMJitCompiler *compiler, MVMin
MVMint32 i = 0;
while (i < alc->active_num) {
MVMJitExprValue *value = alc->active[i];
if (value->last_use <= order_nr &&
/* can't expire values held in locked registers */
!(value->state == MVM_JIT_VALUE_ALLOCATED &&
REGISTER_IS_LOCKED(alc, value->reg_num))) {
if (value->last_use <= order_nr) {
MVM_jit_register_expire(tc, compiler, value);
} else {
i++;
}
}
}

0 comments on commit c9bf2fc

Please sign in to comment.