narray first check in
[cacao.git] / jit.h
1 /* jit.h ***********************************************************************
2
3         Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
4
5         See file COPYRIGHT for information on usage and disclaimer of warranties
6
7         new compiler header file for inclusion in other moduls.
8
9         Authors: Andreas  Krall      EMAIL: cacao@complang.tuwien.ac.at
10                  Reinhard Grafl      EMAIL: cacao@complang.tuwien.ac.at
11
12         Last Change: 1997/11/05
13
14 *******************************************************************************/
15
16 #ifndef __jit__
17 #define __jit__
18
19 /* compiler switches (set by main function) ***********************************/
20
21 extern bool runverbose;         /* trace all method invocation                */
22 extern bool compileverbose;     /* trace compiler actions                     */
23 extern bool showdisassemble;    /* generate disassembler listing              */
24 extern bool showddatasegment;   /* generate data segment listing              */
25 extern bool showintermediate;   /* generate intermediate code listing         */
26 extern int  optimizelevel;      /* optimzation level  (0 = no optimization)   */
27
28 extern bool checkbounds;        /* check array bounds                         */
29 extern bool opt_loops;          /* optimize array accesses in loops           */
30 extern bool checknull;          /* check null pointers                        */
31 extern bool checkfloats;        /* implement ieee compliant floats            */
32 extern bool checksync;          /* do synchronization                         */
33
34 extern bool getcompilingtime;   /* compute compile time                       */
35 extern long compilingtime;      /* accumulated compile time                   */
36
37 extern int  has_ext_instr_set;  /* has instruction set extensions */
38
39 extern bool statistics;         
40
41 extern int count_jit_calls;
42 extern int count_methods;
43 extern int count_spills;
44 extern int count_pcmd_activ;
45 extern int count_pcmd_drop;
46 extern int count_pcmd_zero;
47 extern int count_pcmd_const_store;
48 extern int count_pcmd_const_alu;
49 extern int count_pcmd_const_bra;
50 extern int count_pcmd_load;
51 extern int count_pcmd_move;
52 extern int count_load_instruction;
53 extern int count_pcmd_store;
54 extern int count_pcmd_store_comb;
55 extern int count_dup_instruction;
56 extern int count_pcmd_op;
57 extern int count_pcmd_mem;
58 extern int count_pcmd_met;
59 extern int count_pcmd_bra;
60 extern int count_pcmd_table;
61 extern int count_pcmd_return;
62 extern int count_pcmd_returnx;
63 extern int count_check_null;
64 extern int count_check_bound;
65 extern int count_max_basic_blocks;
66 extern int count_basic_blocks;
67 extern int count_max_javainstr;
68 extern int count_javainstr;
69 extern int count_javacodesize;
70 extern int count_javaexcsize;
71 extern int count_calls;
72 extern int count_tryblocks;
73 extern int count_code_len;
74 extern int count_data_len;
75 extern int count_cstub_len;
76 extern int count_nstub_len;
77 extern int count_max_new_stack;
78 extern int count_upper_bound_new_stack;
79 extern int *count_block_stack;
80 extern int *count_analyse_iterations;
81 extern int *count_method_bb_distribution;
82 extern int *count_block_size_distribution;
83 extern int *count_store_length;
84 extern int *count_store_depth;
85
86 /* prototypes *****************************************************************/
87
88 methodptr jit_compile (methodinfo *m);  /* compile a method with jit compiler */
89
90 void jit_init();                        /* compiler initialisation            */
91 void jit_close();                       /* compiler finalisation              */
92
93 u1 *createcompilerstub (methodinfo *m);
94 u1 *createnativestub (functionptr f, methodinfo *m);
95
96 void removecompilerstub (u1 *stub);
97 void removenativestub (u1 *stub);
98
99 #endif
100
101 /*
102  * These are local overrides for various environment variables in Emacs.
103  * Please do not remove this and leave it at the end of the file, where
104  * Emacs will automagically detect them.
105  * ---------------------------------------------------------------------
106  * Local variables:
107  * mode: c
108  * indent-tabs-mode: t
109  * c-basic-offset: 4
110  * tab-width: 4
111  * End:
112  */