use functions instead of macros, reformat/reindent
[cparser] / driver / firm_opt.h
1 #ifndef FIRM_OPT_H
2 #define FIRM_OPT_H
3
4 #include <libfirm/firm_types.h>
5 #include <libfirm/dbginfo.h>
6
7 enum rts_names {
8   rts_debugbreak,  /**< the name of the __debugbreak() intrinsic */
9   rts_abort,       /**< the name of the abort() function */
10   rts_abs,         /**< the name of the abs() function */
11   rts_alloca,      /**< the name of the alloca() function */
12   rts_labs,        /**< the name of the labs() function */
13   rts_llabs,       /**< the name of the llabs() function */
14   rts_imaxabs,     /**< the name of the imaxabs() function */
15
16   /* double -> double functions */
17   rts_fabs,        /**< the name of the fabs() function */
18   rts_sqrt,        /**< the name of the sqrt() function */
19   rts_cbrt,        /**< the name of the cbrt() function */
20   rts_pow,         /**< the name of the pow() function */
21   rts_exp,         /**< the name of the exp() function */
22   rts_exp2,        /**< the name of the exp2() function */
23   rts_exp10,       /**< the name of the exp10() function */
24   rts_log,         /**< the name of the log() function */
25   rts_log2,        /**< the name of the log2() function */
26   rts_log10,       /**< the name of the log10() function */
27   rts_sin,         /**< the name of the sin() function */
28   rts_cos,         /**< the name of the cos() function */
29   rts_tan,         /**< the name of the tan() function */
30   rts_asin,        /**< the name of the asin() function */
31   rts_acos,        /**< the name of the acos() function */
32   rts_atan,        /**< the name of the atan() function */
33   rts_sinh,        /**< the name of the sinh() function */
34   rts_cosh,        /**< the name of the cosh() function */
35   rts_tanh,        /**< the name of the tanh() function */
36
37   /* float -> float functions */
38   rts_fabsf,       /**< the name of the fabsf() function */
39   rts_sqrtf,       /**< the name of the sqrtf() function */
40   rts_cbrtf,       /**< the name of the cbrtf() function */
41   rts_powf,        /**< the name of the powf() function */
42   rts_expf,        /**< the name of the expf() function */
43   rts_exp2f,       /**< the name of the exp2f() function */
44   rts_exp10f,      /**< the name of the exp10f() function */
45   rts_logf,        /**< the name of the logf() function */
46   rts_log2f,       /**< the name of the log2f() function */
47   rts_log10f,      /**< the name of the log10f() function */
48   rts_sinf,        /**< the name of the sinf() function */
49   rts_cosf,        /**< the name of the cosf() function */
50   rts_tanf,        /**< the name of the tanf() function */
51   rts_asinf,       /**< the name of the asinf() function */
52   rts_acosf,       /**< the name of the acosf() function */
53   rts_atanf,       /**< the name of the atanf() function */
54   rts_sinhf,       /**< the name of the sinhf() function */
55   rts_coshf,       /**< the name of the coshf() function */
56   rts_tanhf,       /**< the name of the tanhf() function */
57
58   /* long double -> long double functions */
59   rts_fabsl,       /**< the name of the fabsl() function */
60   rts_sqrtl,       /**< the name of the sqrtl() function */
61   rts_cbrtl,       /**< the name of the cbrtl() function */
62   rts_powl,        /**< the name of the powl() function */
63   rts_expl,        /**< the name of the expl() function */
64   rts_exp2l,       /**< the name of the exp2l() function */
65   rts_exp10l,      /**< the name of the exp10l() function */
66   rts_logl,        /**< the name of the log() function */
67   rts_log2l,       /**< the name of the log2() function */
68   rts_log10l,      /**< the name of the log10() function */
69   rts_sinl,        /**< the name of the sinl() function */
70   rts_cosl,        /**< the name of the cosl() function */
71   rts_tanl,        /**< the name of the tanl() function */
72   rts_asinl,       /**< the name of the asinl() function */
73   rts_acosl,       /**< the name of the acosl() function */
74   rts_atanl,       /**< the name of the atanl() function */
75   rts_sinhl,       /**< the name of the sinhl() function */
76   rts_coshl,       /**< the name of the coshl() function */
77   rts_tanhl,       /**< the name of the tanhl() function */
78
79   /* string functions */
80   rts_strcmp,      /**< the name of the strcmp() function */
81   rts_strncmp,     /**< the name of the strncmp() function */
82   rts_strcpy,      /**< the name of the strcpy() function */
83   rts_strlen,      /**< the name of the strlen() function */
84   rts_memcpy,      /**< the name of the memcpy() function */
85   rts_mempcpy,     /**< the name of the mempcpy() function */
86   rts_memmove,     /**< the name of the memmove() function */
87   rts_memset,      /**< the name of the memset() function */
88   rts_memcmp,      /**< the name of the memcmp() function */
89
90   rts_max
91 };
92
93 extern ir_entity_ptr rts_entities[rts_max];
94
95 /**
96  * This function is called, whenever a local variable is used before
97  * definition.
98  */
99 extern ir_node *uninitialized_local_var(ir_graph *irg, ir_mode *mode, int pos);
100
101 /** Debug printf implementation. */
102 extern void dbg_printf(const char *fmt, ...);
103
104 /** Convert the debug info into human readable form. */
105 extern unsigned dbg_snprint(char *buf, unsigned len, const dbg_info *dbg);
106
107 /** Convert the debug info back. */
108 extern const char *dbg_retrieve(const dbg_info *dbg, unsigned *line);
109
110 /** Do the necessary lowering for compound parameters. */
111 extern void lower_compound_params(void);
112
113 /** Initialize for the Firm-generating back end. */
114 void gen_firm_init(void);
115
116 /** called, after the Firm generation is completed. */
117 void gen_firm_finish(FILE *out, const char *input_filename, int c_mode, int firm_const_exists);
118
119 void gen_Firm_assembler(const char *input_filename);
120
121 /** early initialization. */
122 void firm_early_init(void);
123
124 /** process optimisation commandline option */
125 int firm_opt_option(const char *opt);
126
127 /** print help about optimisations options */
128 void firm_opt_option_help(void);
129
130 #endif /* FIRM_OPT_H */