aboutsummaryrefslogtreecommitdiff
path: root/src/lj_iropt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_iropt.h')
-rw-r--r--src/lj_iropt.h6
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. */
14LJ_FUNC void LJ_FASTCALL lj_ir_growtop(jit_State *J); 16LJ_FUNC void LJ_FASTCALL lj_ir_growtop(jit_State *J);
15LJ_FUNC TRef LJ_FASTCALL lj_ir_emit(jit_State *J); 17LJ_FUNC TRef LJ_FASTCALL lj_ir_emit(jit_State *J);
18LJ_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). */
18static LJ_AINLINE void lj_ir_set_(jit_State *J, uint16_t ot, IRRef1 a, IRRef1 b) 21static 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. */
84LJ_FUNC TRef LJ_FASTCALL lj_opt_fold(jit_State *J); 87LJ_FUNC TRef LJ_FASTCALL lj_opt_fold(jit_State *J);
85LJ_FUNC TRef LJ_FASTCALL lj_opt_cse(jit_State *J); 88LJ_FUNC TRef LJ_FASTCALL lj_opt_cse(jit_State *J);
89LJ_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. */
88enum { 92enum {
@@ -106,7 +110,7 @@ LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_aload(jit_State *J);
106LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_hload(jit_State *J); 110LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_hload(jit_State *J);
107LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_uload(jit_State *J); 111LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_uload(jit_State *J);
108LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_fload(jit_State *J); 112LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_fload(jit_State *J);
109LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_tlen(jit_State *J); 113LJ_FUNC TRef LJ_FASTCALL lj_opt_fwd_tab_len(jit_State *J);
110LJ_FUNC int lj_opt_fwd_wasnonnil(jit_State *J, IROpT loadop, IRRef xref); 114LJ_FUNC int lj_opt_fwd_wasnonnil(jit_State *J, IROpT loadop, IRRef xref);
111 115
112/* Dead-store elimination. */ 116/* Dead-store elimination. */