diff options
Diffstat (limited to 'src/lj_iropt.h')
-rw-r--r-- | src/lj_iropt.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lj_iropt.h b/src/lj_iropt.h index 69b0a955..52077ad5 100644 --- a/src/lj_iropt.h +++ b/src/lj_iropt.h | |||
@@ -6,6 +6,8 @@ | |||
6 | #ifndef _LJ_IROPT_H | 6 | #ifndef _LJ_IROPT_H |
7 | #define _LJ_IROPT_H | 7 | #define _LJ_IROPT_H |
8 | 8 | ||
9 | #include <stdarg.h> | ||
10 | |||
9 | #include "lj_obj.h" | 11 | #include "lj_obj.h" |
10 | #include "lj_jit.h" | 12 | #include "lj_jit.h" |
11 | 13 | ||
@@ -13,6 +15,7 @@ | |||
13 | /* IR emitter. */ | 15 | /* IR emitter. */ |
14 | LJ_FUNC void LJ_FASTCALL lj_ir_growtop(jit_State *J); | 16 | LJ_FUNC void LJ_FASTCALL lj_ir_growtop(jit_State *J); |
15 | LJ_FUNC TRef LJ_FASTCALL lj_ir_emit(jit_State *J); | 17 | LJ_FUNC TRef LJ_FASTCALL lj_ir_emit(jit_State *J); |
18 | LJ_FUNC TRef lj_ir_call(jit_State *J, IRCallID id, ...); | ||
16 | 19 | ||
17 | /* Save current IR in J->fold.ins, but do not emit it (yet). */ | 20 | /* Save current IR in J->fold.ins, but do not emit it (yet). */ |
18 | static LJ_AINLINE void lj_ir_set_(jit_State *J, uint16_t ot, IRRef1 a, IRRef1 b) | 21 | static LJ_AINLINE void lj_ir_set_(jit_State *J, uint16_t ot, IRRef1 a, IRRef1 b) |
@@ -83,6 +86,7 @@ LJ_FUNC void lj_ir_rollback(jit_State *J, IRRef ref); | |||
83 | /* Emit IR instructions with on-the-fly optimizations. */ | 86 | /* Emit IR instructions with on-the-fly optimizations. */ |
84 | LJ_FUNC TRef LJ_FASTCALL lj_opt_fold(jit_State *J); | 87 | LJ_FUNC TRef LJ_FASTCALL lj_opt_fold(jit_State *J); |
85 | LJ_FUNC TRef LJ_FASTCALL lj_opt_cse(jit_State *J); | 88 | LJ_FUNC TRef LJ_FASTCALL lj_opt_cse(jit_State *J); |
89 | LJ_FUNC TRef LJ_FASTCALL lj_opt_cselim(jit_State *J, IRRef lim); | ||
86 | 90 | ||
87 | /* Special return values for the fold functions. */ | 91 | /* Special return values for the fold functions. */ |
88 | enum { | 92 | enum { |
@@ -106,7 +110,7 @@ LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_aload(jit_State *J); | |||
106 | LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_hload(jit_State *J); | 110 | LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_hload(jit_State *J); |
107 | LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_uload(jit_State *J); | 111 | LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_uload(jit_State *J); |
108 | LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_fload(jit_State *J); | 112 | LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_fload(jit_State *J); |
109 | LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_tlen(jit_State *J); | 113 | LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_tab_len(jit_State *J); |
110 | LJ_FUNC int lj_opt_fwd_wasnonnil(jit_State *J, IROpT loadop, IRRef xref); | 114 | LJ_FUNC int lj_opt_fwd_wasnonnil(jit_State *J, IROpT loadop, IRRef xref); |
111 | 115 | ||
112 | /* Dead-store elimination. */ | 116 | /* Dead-store elimination. */ |