Browse Source

Improve unrolling heuristics for non-looping inner loops.

Mike Pall 14 years ago
parent
commit
18fbf86c9e
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/lj_record.c

+ 2 - 1
src/lj_record.c

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