libFirm
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 
115 FIRM_API void save_optimization_state(optimization_state_t *state);
116 
120 FIRM_API void restore_optimization_state(const optimization_state_t *state);
121 
125 FIRM_API void all_optimizations_off(void);
126 
129 #include "end.h"
130 
131 #endif
int get_opt_algebraic_simplification(void)
Returns algebraic simplification setting.
void set_optimize(int value)
This function enables/disables optimizations globally.
int get_optimize(void)
Returns global optimizations flag.
void set_opt_cse(int value)
Enables/Disables common subexpression elimination.
unsigned optimization_state_t
A container type to load/restore all optimizations.
Definition: irflag.h:39
void restore_optimization_state(const optimization_state_t *state)
Restore the current optimization state.
void save_optimization_state(optimization_state_t *state)
Save the current optimization state.
int get_opt_global_cse(void)
Returns global constant subexpression elimination setting.
void set_opt_global_null_ptr_elimination(int value)
Enable/Disable Global Null Pointer Test Elimination.
void set_opt_algebraic_simplification(int value)
Enables/Disables algebraic simplifications.
void set_opt_global_cse(int value)
Enables/Disables global constant subexpression elimination.
void set_opt_constant_folding(int value)
Enables/Disables constant folding optimization.
int get_opt_cse(void)
Returns constant folding optimization setting.
int get_opt_constant_folding(void)
returns 0 if constant_folding is disabled, !=0 otherwise
int get_opt_global_null_ptr_elimination(void)
Returns global null pointer test elimination setting.
void all_optimizations_off(void)
Switches ALL optimizations off.