Improve unrolling heuristics for non-looping inner loops.

This commit is contained in:
Mike Pall 2010-11-25 11:38:48 +01:00
parent 7338456796
commit 18fbf86c9e

View File

@ -426,7 +426,8 @@ static int innerloopleft(jit_State *J, const BCIns *pc)
ptrdiff_t i;
for (i = 0; i < PENALTY_SLOTS; i++)
if (mref(J->penalty[i].pc, const BCIns) == pc) {
if (J->penalty[i].reason == LJ_TRERR_LLEAVE &&
if ((J->penalty[i].reason == LJ_TRERR_LLEAVE ||
J->penalty[i].reason == LJ_TRERR_LINNER) &&
J->penalty[i].val >= 2*PENALTY_MIN)
return 1;
break;