option was parsed twice
[cparser] / driver / firm_cmdline.h
1 /**
2  * @file firm_cmdline.h -- Additional Firm generating backend parameters
3  *
4  * Generates Firm fro the IL.  It works with both C++ and C programs.
5  */
6 #ifndef FIRM_CMDLINE_H
7 #define FIRM_CMDLINE_H
8
9 #include <stdbool.h>
10
11 /* optimization settings */
12 struct a_firm_opt {
13   bool     const_folding;   /**< enable constant folding */
14   bool     cse;             /**< enable common-subexpression elimination */
15   bool     confirm;         /**< enable Confirm optimization */
16   bool     muls;            /**< enable architecture dependent mul optimization */
17   bool     divs;            /**< enable architecture dependent div optimization */
18   bool     mods;            /**< enable architecture dependent mod optimization */
19   bool     alias_analysis;  /**< enable Alias Analysis */
20   bool     strict_alias;    /**< enable strict Alias Analysis (using type based AA) */
21   bool     no_alias;        /**< no aliasing possible. */
22   bool     fp_model;        /**< fp model */
23   bool     verify;          /**< Firm verifier setting */
24   bool     check_all;       /**< enable checking all Firm phases */
25   int      clone_threshold; /**< The threshold value for procedure cloning. */
26   unsigned inline_maxsize;  /**< Maximum function size for inlining. */
27   unsigned inline_threshold;/**< Inlining benefice threshold. */
28   bool     verify_edges;    /**< verify edges */
29 };
30
31 /** statistic options */
32 typedef enum a_firmstat_selection_tag {
33   STAT_NONE        = 0x00000000,
34   STAT_BEFORE_OPT  = 0x00000001,
35   STAT_AFTER_OPT   = 0x00000002,
36   STAT_AFTER_LOWER = 0x00000004,
37   STAT_FINAL_IR    = 0x00000008,
38   STAT_FINAL       = 0x00000010,
39 } a_firmstat_selection;
40
41 /* dumping options */
42 struct a_firm_dump {
43   bool debug_print;   /**< enable debug print */
44   bool all_types;     /**< dump the All_types graph */
45   bool no_blocks;     /**< dump non-blocked graph */
46   bool extbb;         /**< dumps extended basic blocks */
47   bool ir_graph;      /**< dump all graphs */
48   bool all_phases;    /**< dump the IR graph after all phases */
49   bool statistic;     /**< Firm statistic setting */
50   bool stat_pattern;  /**< enable Firm statistic pattern */
51   bool stat_dag;      /**< enable Firm DAG statistic */
52   char *filter;       /**< the dump filter */
53 };
54
55 struct a_firm_be_opt {
56   bool selection;
57   bool node_stat;
58 };
59
60 extern struct a_firm_be_opt firm_be_opt;
61 extern struct a_firm_opt firm_opt;
62 extern struct a_firm_dump firm_dump;
63 extern struct a_firm_ext_grs firm_ext_grs;
64
65 void print_option_help(const char *name, const char *description);
66
67 /**
68  * called by the generic command line parser
69  * to handle the --firm= or -f options
70  */
71 int firm_option(const char *opt);
72
73 #endif