BugFix: copy mode when creating inverse operation
[libfirm] / ir / be / be.h
1
2 #ifndef _BE_MAIN_H
3 #define _BE_MAIN_H
4
5 #include <stdio.h>
6 #include "irarch.h"
7 #include "archop.h"
8 #include "lower_dw.h"
9 #include "dbginfo.h"
10
11 /**
12  * This structure contains parameters that should be
13  * propagated to the libFirm parameter set.
14  */
15 typedef struct backend_params {
16         /** Additional opcodes settings. */
17         const arch_ops_info *arch_op_settings;
18
19         /** Settings for architecture dependent optimizations */
20         const arch_dep_params_t *dep_param;
21
22         /** if set, the backend cannot handle DWORD access */
23         unsigned do_dw_lowering;
24
25         /** the architecture specific intrinsic function creator */
26         create_intrinsic_fkt *arch_create_intrinsic_fkt;
27
28         /** the context parameter for the create intrinsic function */
29         void *create_intrinsic_ctx;
30
31 } backend_params;
32
33 /**
34  * Register the Firm backend command line options.
35  */
36 void be_opt_register(void);
37
38 /**
39  * Parse one backend argument.
40  */
41 int be_parse_arg(const char *arg);
42
43 /**
44  * Initialize the Firm backend. Must be run BEFORE init_firm()!
45  *
46  * @return libFirm configuration parameters for the selected
47  *         backend
48  */
49 const backend_params *be_init(void);
50
51 /**
52  * Main interface to the frontend.
53  */
54 void be_main(FILE *file_handle);
55
56 /** The type of the debug info retriever function. */
57 typedef const char *(*retrieve_dbg_func)(const dbg_info *dbg, unsigned *line);
58
59 /**
60  * Sets a debug info retriever.
61  *
62  * @param func   the debug retriever function.
63  */
64 void be_set_debug_retrieve(retrieve_dbg_func func);
65
66 /**
67  * Retrieve the debug info.
68  */
69 const char *be_retrieve_dbg_info(const dbg_info *dbg, unsigned *line);
70
71 typedef struct _be_main_env_t be_main_env_t;
72 typedef struct _be_irg_t be_irg_t;
73 typedef struct _be_options_t be_options_t;
74
75 #endif /* _BE_MAIN_H */