Initial revision
[cacao.git] / ncomp / ncomp.h
1 /****************************** ncomp.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 /************** compiler switches (are set by main function) ******************/
17
18 extern bool runverbose;         /* Das Programm soll w"arend des Laufs alle
19                                    Methodenaufrufe mitprotokollieren */
20 extern bool compileverbose;     /* Der Compiler soll sagen, was er macht */
21 extern bool showstack;          /* Alle Stackzust"ande ausgeben */
22 extern bool showdisassemble;    /* Disassemblerlisting ausgeben */
23 extern bool showintermediate;   /* Zwischencode ausgeben */
24 extern int  optimizelevel;      /* Optimierungsstufe  (0=keine) */
25
26 extern bool checkbounds;        /* Arraygrenzen "uberpr"ufen */
27 extern bool checknull;          /* auf Null-Pointer "uberpr"ufen */
28 extern bool checkfloats;        /* Fehler bei Fliesskommas abfangen */
29 extern bool checksync;          /* Thread-Synchronisation wirklich machen */
30
31 extern bool getcompilingtime;   
32 extern long compilingtime;      /* CPU-Zeit f"urs "Ubersetzen */
33
34 extern int  has_ext_instr_set;  /* has instruction set extensions */
35
36
37 extern int count_jit_calls;
38 extern int count_methods;
39 extern int count_spills;
40 extern int count_pcmd_activ;
41 extern int count_pcmd_drop;
42 extern int count_pcmd_zero;
43 extern int count_pcmd_const_store;
44 extern int count_pcmd_const_alu;
45 extern int count_pcmd_const_bra;
46 extern int count_pcmd_load;
47 extern int count_pcmd_move;
48 extern int count_load_instruction;
49 extern int count_pcmd_store;
50 extern int count_pcmd_store_comb;
51 extern int count_dup_instruction;
52 extern int count_pcmd_op;
53 extern int count_pcmd_mem;
54 extern int count_pcmd_met;
55 extern int count_pcmd_bra;
56 extern int count_pcmd_table;
57 extern int count_pcmd_return;
58 extern int count_pcmd_returnx;
59 extern int count_max_basic_blocks;
60 extern int count_basic_blocks;
61 extern int count_max_javainstr;
62 extern int count_javainstr;
63 extern int count_javacodesize;
64 extern int count_javaexcsize;
65 extern int count_calls;
66 extern int count_tryblocks;
67 extern int count_code_len;
68 extern int count_data_len;
69 extern int count_cstub_len;
70 extern int count_nstub_len;
71 extern int count_max_new_stack;
72 extern int count_upper_bound_new_stack;
73 extern int *count_block_stack;
74 extern int *count_analyse_iterations;
75 extern int *count_method_bb_distribution;
76 extern int *count_block_size_distribution;
77 extern int *count_store_length;
78 extern int *count_store_depth;
79
80 /******************************* prototypes ***********************************/
81
82 methodptr new_compile (methodinfo *m);  /* compile a method with new compiler */
83
84 void ncomp_init();                      /* compiler initialisation            */
85 void ncomp_close();                     /* compiler finalisation              */
86
87 /*
88 u1 *createcompilerstub (methodinfo *m);
89 u1 *createnativestub (functionptr f, methodinfo *m);
90
91 void removecompilerstub (u1 *stub);
92 void removenativestub (u1 *stub);
93 */