Prefer recording loops over calls.
Hotcounts are decremented by 2 for loops and by 1 for calls.
This commit is contained in:
@@ -751,16 +751,16 @@ static const unsigned char build_actionlist[16156] = {
|
||||
182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,6,255,65,199,71,252,
|
||||
252,237,65,131,199,8,255,199,68,194,252,244,237,255,131,192,1,252,233,244,
|
||||
5,248,7,141,171,233,252,247,197,237,15,133,244,14,41,252,234,255,1,252,233,
|
||||
255,137,221,209,252,237,129,229,239,102,65,131,172,253,46,233,1,15,132,244,
|
||||
148,255,141,12,202,255,129,121,253,4,239,15,133,244,255,255,129,121,253,12,
|
||||
239,15,133,244,60,129,121,253,20,239,15,133,244,60,139,41,131,121,16,0,15,
|
||||
140,244,251,255,129,121,253,12,239,15,133,244,165,129,121,253,20,239,15,133,
|
||||
244,165,255,139,105,16,133,252,237,15,136,244,251,3,41,15,128,244,247,137,
|
||||
41,255,59,105,8,199,65,28,237,137,105,24,255,15,142,244,253,248,1,248,6,141,
|
||||
156,253,131,233,255,141,156,253,131,233,15,183,67,252,254,15,142,245,248,
|
||||
1,248,6,255,15,143,244,253,248,6,141,156,253,131,233,248,1,255,248,7,139,
|
||||
3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,5,
|
||||
255,3,41,15,128,244,1,137,41,255,15,141,244,7,255,141,156,253,131,233,15,
|
||||
255,137,221,209,252,237,129,229,239,102,65,129,172,253,46,233,238,15,130,
|
||||
244,148,255,141,12,202,255,129,121,253,4,239,15,133,244,255,255,129,121,253,
|
||||
12,239,15,133,244,60,129,121,253,20,239,15,133,244,60,139,41,131,121,16,0,
|
||||
15,140,244,251,255,129,121,253,12,239,15,133,244,165,129,121,253,20,239,15,
|
||||
133,244,165,255,139,105,16,133,252,237,15,136,244,251,3,41,15,128,244,247,
|
||||
137,41,255,59,105,8,199,65,28,237,137,105,24,255,15,142,244,253,248,1,248,
|
||||
6,141,156,253,131,233,255,141,156,253,131,233,15,183,67,252,254,15,142,245,
|
||||
248,1,248,6,255,15,143,244,253,248,6,141,156,253,131,233,248,1,255,248,7,
|
||||
139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,248,
|
||||
5,255,3,41,15,128,244,1,137,41,255,15,141,244,7,255,141,156,253,131,233,15,
|
||||
183,67,252,254,15,141,245,255,15,140,244,7,255,252,233,244,6,248,9,255,129,
|
||||
121,253,4,239,255,15,131,244,60,129,121,253,12,239,15,131,244,60,255,129,
|
||||
121,253,12,239,15,131,244,165,129,121,253,20,239,15,131,244,165,255,139,105,
|
||||
@@ -777,22 +777,22 @@ static const unsigned char build_actionlist[16156] = {
|
||||
139,4,129,72,139,128,233,139,108,36,24,65,137,150,233,65,137,174,233,76,137,
|
||||
36,36,76,137,108,36,8,72,131,252,236,16,252,255,224,255,141,156,253,131,233,
|
||||
139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,
|
||||
137,221,209,252,237,129,229,239,102,65,131,172,253,46,233,1,15,132,244,150,
|
||||
255,68,139,187,233,139,108,36,24,141,12,202,59,141,233,15,135,244,24,15,182,
|
||||
139,233,57,200,15,134,244,249,248,2,255,15,183,67,252,254,252,233,245,255,
|
||||
248,3,199,68,194,252,252,237,131,192,1,57,200,15,134,244,3,252,233,244,2,
|
||||
255,141,44,197,237,141,4,194,68,139,122,252,248,137,104,252,252,68,137,120,
|
||||
252,248,139,108,36,24,141,12,200,59,141,233,15,135,244,23,137,209,137,194,
|
||||
15,182,171,233,133,252,237,15,132,244,248,248,1,131,193,8,57,209,15,131,244,
|
||||
249,68,139,121,252,248,68,137,56,68,139,121,252,252,68,137,120,4,131,192,
|
||||
8,199,65,252,252,237,131,252,237,1,15,133,244,1,248,2,255,68,139,187,233,
|
||||
139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,238,255,
|
||||
248,3,199,64,4,237,131,192,8,131,252,237,1,15,133,244,3,252,233,244,2,255,
|
||||
139,106,252,248,76,139,189,233,139,108,36,24,141,68,194,252,248,137,149,233,
|
||||
141,136,233,59,141,233,137,133,233,255,76,137,252,254,137,252,239,255,15,
|
||||
135,244,22,65,199,134,233,237,255,65,252,255,215,255,65,252,255,150,233,255,
|
||||
65,199,134,233,237,139,149,233,141,12,194,252,247,217,3,141,233,139,90,252,
|
||||
252,252,233,244,12,255,254,0
|
||||
137,221,209,252,237,129,229,239,102,65,129,172,253,46,233,238,15,130,244,
|
||||
150,255,68,139,187,233,139,108,36,24,141,12,202,59,141,233,15,135,244,24,
|
||||
15,182,139,233,57,200,15,134,244,249,248,2,255,15,183,67,252,254,252,233,
|
||||
245,255,248,3,199,68,194,252,252,237,131,192,1,57,200,15,134,244,3,252,233,
|
||||
244,2,255,141,44,197,237,141,4,194,68,139,122,252,248,137,104,252,252,68,
|
||||
137,120,252,248,139,108,36,24,141,12,200,59,141,233,15,135,244,23,137,209,
|
||||
137,194,15,182,171,233,133,252,237,15,132,244,248,248,1,131,193,8,57,209,
|
||||
15,131,244,249,68,139,121,252,248,68,137,56,68,139,121,252,252,68,137,120,
|
||||
4,131,192,8,199,65,252,252,237,131,252,237,1,15,133,244,1,248,2,255,68,139,
|
||||
187,233,139,3,15,182,204,15,182,232,131,195,4,193,232,16,65,252,255,36,252,
|
||||
238,255,248,3,199,64,4,237,131,192,8,131,252,237,1,15,133,244,3,252,233,244,
|
||||
2,255,139,106,252,248,76,139,189,233,139,108,36,24,141,68,194,252,248,137,
|
||||
149,233,141,136,233,59,141,233,137,133,233,255,76,137,252,254,137,252,239,
|
||||
255,15,135,244,22,65,199,134,233,237,255,65,252,255,215,255,65,252,255,150,
|
||||
233,255,65,199,134,233,237,139,149,233,141,12,194,252,247,217,3,141,233,139,
|
||||
90,252,252,252,233,244,12,255,254,0
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -2777,7 +2777,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
|
||||
case BC_FORL:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 15309, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
dasm_put(Dst, 15309, HOTCOUNT_PCMASK, GG_DISP2HOT, HOTCOUNT_LOOP);
|
||||
#endif
|
||||
break;
|
||||
|
||||
@@ -2893,7 +2893,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
|
||||
case BC_ITERL:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 15309, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
dasm_put(Dst, 15309, HOTCOUNT_PCMASK, GG_DISP2HOT, HOTCOUNT_LOOP);
|
||||
#endif
|
||||
break;
|
||||
|
||||
@@ -2913,7 +2913,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
|
||||
case BC_LOOP:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 15309, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
dasm_put(Dst, 15309, HOTCOUNT_PCMASK, GG_DISP2HOT, HOTCOUNT_LOOP);
|
||||
#endif
|
||||
break;
|
||||
|
||||
@@ -2942,7 +2942,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse)
|
||||
|
||||
case BC_FUNCF:
|
||||
#if LJ_HASJIT
|
||||
dasm_put(Dst, 15842, HOTCOUNT_PCMASK, GG_DISP2HOT);
|
||||
dasm_put(Dst, 15842, HOTCOUNT_PCMASK, GG_DISP2HOT, HOTCOUNT_CALL);
|
||||
#endif
|
||||
case BC_FUNCV: /* NYI: compiled vararg functions. */
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user