1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
4 * Authors: Christian Schaefer
6 * irflag --- optimization flags
14 /* If optimize == 0 no optimizations are performed.
15 Default: optimize == 1. */
16 void set_optimize (int value);
17 int get_optimize (void);
19 /* If opt_constant_folding == 1 perform
20 - constant expression evaluation (2 + 5 ==> 7, 3 < 2 ==> false)
21 - algebraic simplification (a * 0 ==> 0, a or a ==> a)
22 - simplification of tests ( !(a < b) ==> (a >= b))
23 - merging single exit with single entry blocks
24 - unreachable code elimination
25 - refining the memory representation
26 - remove store after load
27 Default: opt_constant_folding == 1. */
28 void set_opt_constant_folding (int value);
29 int get_opt_constant_folding (void);
31 /* If opt_cse == 1 perform constant subexpression elimination.
32 Default: opt_cse == 1. */
33 void set_opt_cse (int value);
34 int get_opt_cse (void);
36 /* If opt_global_cse == 1 and opt_cse == 1 perform intra procedure
37 constant subexpression elimination for floating nodes. Intra
38 procedure cse gets the graph into state "floating". It is necessary
39 to run pre/code motion to get the graph back into state "pinned".
40 Default: opt_global_cse == 1. */
41 void set_opt_global_cse (int value);
42 int get_opt_global_cse (void);
44 /* If opt_unreachable_code == 1 replace nodes (except Block,
45 Phi and Tuple) with a Bad predecessor by the Bad node.
46 Default: opt_unreachable_code == 1. */
47 void set_opt_unreachable_code(int value);
48 int get_opt_unreachable_code(void);
50 /* Performs Straightening, if simplifications and loop simplifications.
51 Sets all separate control flow flags (control_flow_straightening,
52 weak_simplification and strong_simplification). */
53 void set_opt_control_flow(int value);
55 /* Performs Straightening */
56 void set_opt_control_flow_straightening(int value);
57 int get_opt_control_flow_straightening(void);
58 /* Performs if simplifications in local optimizations. */
59 void set_opt_control_flow_weak_simplification(int value);
60 int get_opt_control_flow_weak_simplification(void);
61 /* Performs strong if and loop simplification (in optimize_cf). */
62 void set_opt_control_flow_strong_simplification(int value);
63 int get_opt_control_flow_strong_simplification(void);
65 /* If opt_reassociation == 1 reassociation is performed.
66 Default: opt_reassociation == 1. */
67 void set_opt_reassociation(int value);
68 int get_opt_reassociation(void);
70 /* If opt_dead_node_elimination == 1 deallocate all dead nodes
71 by copying the firm graph.
72 Default: opt_dead_node_elimination == 0. @@@ as buggy, else 1. */
73 void set_opt_dead_node_elimination (int value);
74 int get_opt_dead_node_elimination (void);
76 /* If opt_inline == 1 the inlining transformation is performed. */
77 void set_opt_inline (int value);
78 int get_opt_inline (void);