libFirm
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
irflag.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5 
11 #ifndef FIRM_IR_IRFLAG_H
12 #define FIRM_IR_IRFLAG_H
13 
14 #include "firm_types.h"
15 #include "begin.h"
16 
39 typedef unsigned optimization_state_t;
40 
47 FIRM_API void set_optimize(int value);
50 FIRM_API int get_optimize(void);
51 
58 FIRM_API void set_opt_constant_folding(int value);
60 FIRM_API int get_opt_constant_folding(void);
61 
69 FIRM_API void set_opt_algebraic_simplification(int value);
70 
72 FIRM_API int get_opt_algebraic_simplification(void);
73 
79 FIRM_API void set_opt_cse(int value);
80 
82 FIRM_API int get_opt_cse(void);
83 
93 FIRM_API void set_opt_global_cse(int value);
94 
96 FIRM_API int get_opt_global_cse(void);
97 
107 FIRM_API void set_opt_global_null_ptr_elimination(int value);
108 
110 FIRM_API int get_opt_global_null_ptr_elimination(void);
111 
118 FIRM_API void set_opt_closed_world(int value);
119 
121 FIRM_API int get_opt_closed_world(void);
122 
126 FIRM_API void save_optimization_state(optimization_state_t *state);
127 
131 FIRM_API void restore_optimization_state(const optimization_state_t *state);
132 
136 FIRM_API void all_optimizations_off(void);
137 
140 #include "end.h"
141 
142 #endif
void restore_optimization_state(const optimization_state_t *state)
Restore the current optimization state.
void set_opt_algebraic_simplification(int value)
Enables/Disables algebraic simplifications.
int get_opt_cse(void)
Returns constant folding optimization setting.
int get_opt_global_cse(void)
Returns global constant subexpression elimination setting.
int get_opt_constant_folding(void)
returns 0 if constant_folding is disabled, !=0 otherwise
void set_opt_global_null_ptr_elimination(int value)
Enable/Disable Global Null Pointer Test Elimination.
void set_opt_global_cse(int value)
Enables/Disables global constant subexpression elimination.
int get_opt_global_null_ptr_elimination(void)
Returns global null pointer test elimination setting.
void set_opt_constant_folding(int value)
Enables/Disables constant folding optimization.
void save_optimization_state(optimization_state_t *state)
Save the current optimization state.
void all_optimizations_off(void)
Switches ALL optimizations off.
int get_optimize(void)
Returns global optimizations flag.
int get_opt_closed_world(void)
Returns closed world assumption setting.
void set_optimize(int value)
This function enables/disables optimizations globally.
unsigned optimization_state_t
A container type to load/restore all optimizations.
Definition: irflag.h:39
void set_opt_closed_world(int value)
Enable/Disable closed world assumption.
int get_opt_algebraic_simplification(void)
Returns algebraic simplification setting.
void set_opt_cse(int value)
Enables/Disables common subexpression elimination.