ssa: move optimizations from P_BinaryOp to P_BinaryConstOp
[ajla.git] / codegen.h
blobd3ed908516fed8a0a43af5c164eefbe747a7fab5
1 /*
2 * Copyright (C) 2024 Mikulas Patocka
4 * This file is part of Ajla.
6 * Ajla is free software: you can redistribute it and/or modify it under the
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, either version 3 of the License, or (at your option) any later
9 * version.
11 * Ajla is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along with
16 * Ajla. If not, see <https://www.gnu.org/licenses/>.
19 #ifndef AJLA_CODEGEN_H
20 #define AJLA_CODEGEN_H
22 #include "data.h"
24 #ifdef HAVE_CODEGEN
26 #define codegen_fn name(codegen_fn)
27 #define codegen_free name(codegen_free)
28 #define codegen_entry name(codegen_entry)
30 void *codegen_fn(frame_s *fp, const code_t *ip, union internal_arg ia[]);
31 void codegen_free(struct data *codegen);
32 typedef code_return_t (*codegen_type)(frame_s *, struct cg_upcall_vector_s *, tick_stamp_t, void *);
33 extern codegen_type codegen_entry;
35 #endif
37 #endif