1 /* jit.h ***********************************************************************
3 Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
5 See file COPYRIGHT for information on usage and disclaimer of warranties
7 new compiler header file for inclusion in other moduls.
9 Authors: Andreas Krall EMAIL: cacao@complang.tuwien.ac.at
10 Reinhard Grafl EMAIL: cacao@complang.tuwien.ac.at
12 Last Change: 1997/11/05
14 *******************************************************************************/
19 /* compiler switches (set by main function) ***********************************/
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) */
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 */
34 extern bool getcompilingtime; /* compute compile time */
35 extern long compilingtime; /* accumulated compile time */
37 extern int has_ext_instr_set; /* has instruction set extensions */
39 extern bool statistics;
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;
86 /* prototypes *****************************************************************/
88 methodptr jit_compile (methodinfo *m); /* compile a method with jit compiler */
90 void jit_init(); /* compiler initialisation */
91 void jit_close(); /* compiler finalisation */
93 u1 *createcompilerstub (methodinfo *m);
94 u1 *createnativestub (functionptr f, methodinfo *m);
96 void removecompilerstub (u1 *stub);
97 void removenativestub (u1 *stub);
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 * ---------------------------------------------------------------------
108 * indent-tabs-mode: t