From 18fbf86c9e6cb370605087a163605ba53b140f47 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Thu, 25 Nov 2010 11:38:48 +0100 Subject: [PATCH] Improve unrolling heuristics for non-looping inner loops. --- src/lj_record.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lj_record.c b/src/lj_record.c index 58b02a43..621311c1 100644 --- a/src/lj_record.c +++ b/src/lj_record.c @@ -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;