libFirm
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
iroptimize.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1995-2010 University of Karlsruhe. All right reserved.
3
*
4
* This file is part of libFirm.
5
*
6
* This file may be distributed and/or modified under the terms of the
7
* GNU General Public License version 2 as published by the Free Software
8
* Foundation and appearing in the file LICENSE.GPL included in the
9
* packaging of this file.
10
*
11
* Licensees holding valid libFirm Professional Edition licenses may use
12
* this file in accordance with the libFirm Commercial License.
13
* Agreement provided with the Software.
14
*
15
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17
* PURPOSE.
18
*/
19
24
#ifndef FIRM_IROPTIMIZE_H
25
#define FIRM_IROPTIMIZE_H
26
27
#include "
firm_types.h
"
28
#include "nodeops.h"
29
#include "
begin.h
"
30
47
FIRM_API
void
optimize_cf
(
ir_graph
*irg);
48
56
FIRM_API
ir_graph_pass_t
*
optimize_cf_pass
(
const
char
*name);
57
63
FIRM_API
void
opt_jumpthreading
(
ir_graph
* irg);
64
72
FIRM_API
ir_graph_pass_t
*
opt_jumpthreading_pass
(
const
char
*name);
73
80
FIRM_API
void
opt_bool
(
ir_graph
*irg);
81
89
FIRM_API
ir_graph_pass_t
*
opt_bool_pass
(
const
char
*name);
90
96
FIRM_API
void
conv_opt
(
ir_graph
*irg);
97
105
FIRM_API
ir_graph_pass_t
*
conv_opt_pass
(
const
char
*name);
106
111
typedef
int (*
check_alloc_entity_func
)(
ir_entity
*ent);
112
120
FIRM_API
void
escape_enalysis_irg
(
ir_graph
*irg,
121
check_alloc_entity_func
callback);
122
145
FIRM_API
void
escape_analysis
(
int
run_scalar_replace,
146
check_alloc_entity_func
callback);
147
170
FIRM_API
void
optimize_funccalls
(
void
);
171
178
FIRM_API
ir_prog_pass_t
*
optimize_funccalls_pass
(
const
char
*name);
179
189
FIRM_API
void
do_gvn_pre
(
ir_graph
*irg);
190
198
FIRM_API
ir_graph_pass_t
*
do_gvn_pre_pass
(
const
char
*name);
199
211
typedef
int (*
arch_allow_ifconv_func
)(
ir_node
*sel,
ir_node
*mux_false,
212
ir_node
*mux_true);
213
222
FIRM_API
void
opt_if_conv
(
ir_graph
*irg);
223
231
FIRM_API
ir_graph_pass_t
*
opt_if_conv_pass
(
const
char
*name);
232
238
FIRM_API
void
opt_parallelize_mem
(
ir_graph
*irg);
239
247
FIRM_API
ir_graph_pass_t
*
opt_parallelize_mem_pass
(
const
char
*name);
248
260
FIRM_API
ir_node
*
can_replace_load_by_const
(
const
ir_node
*load,
ir_node
*c);
261
287
FIRM_API
void
optimize_load_store
(
ir_graph
*irg);
288
296
FIRM_API
ir_graph_pass_t
*
optimize_load_store_pass
(
const
char
*name);
297
303
FIRM_API
void
opt_ldst
(
ir_graph
*irg);
304
312
FIRM_API
ir_graph_pass_t
*
opt_ldst_pass
(
const
char
*name);
313
323
FIRM_API
void
loop_optimization
(
ir_graph
*irg);
324
335
FIRM_API
void
opt_frame_irg
(
ir_graph
*irg);
336
344
FIRM_API
ir_graph_pass_t
*
opt_frame_irg_pass
(
const
char
*name);
345
347
typedef
enum
osr_flags
{
348
osr_flag_none
= 0,
349
osr_flag_lftr_with_ov_check
= 1,
351
osr_flag_ignore_x86_shift
= 2,
352
osr_flag_keep_reg_pressure
= 4
354
}
osr_flags
;
355
357
#define osr_flag_default osr_flag_lftr_with_ov_check
358
417
FIRM_API
void
opt_osr
(
ir_graph
*irg,
unsigned
flags);
418
427
FIRM_API
ir_graph_pass_t
*
opt_osr_pass
(
const
char
*name,
unsigned
flags);
428
439
FIRM_API
void
remove_phi_cycles
(
ir_graph
*irg);
440
448
FIRM_API
ir_graph_pass_t
*
remove_phi_cycles_pass
(
const
char
*name);
449
450
452
#define DEFAULT_CLONE_THRESHOLD 20
453
465
FIRM_API
void
proc_cloning
(
float
threshold);
466
475
FIRM_API
ir_prog_pass_t
*
proc_cloning_pass
(
const
char
*name,
float
threshold);
476
491
FIRM_API
void
optimize_reassociation
(
ir_graph
*irg);
492
500
FIRM_API
ir_graph_pass_t
*
optimize_reassociation_pass
(
const
char
*name);
501
522
FIRM_API
void
normalize_one_return
(
ir_graph
*irg);
523
531
FIRM_API
ir_graph_pass_t
*
normalize_one_return_pass
(
const
char
*name);
532
553
FIRM_API
void
normalize_n_returns
(
ir_graph
*irg);
554
562
FIRM_API
ir_graph_pass_t
*
normalize_n_returns_pass
(
const
char
*name);
563
571
FIRM_API
void
scalar_replacement_opt
(
ir_graph
*irg);
572
580
FIRM_API
ir_graph_pass_t
*
scalar_replacement_opt_pass
(
const
char
*name);
581
596
FIRM_API
void
opt_tail_rec_irg
(
ir_graph
*irg);
597
605
FIRM_API
ir_graph_pass_t
*
opt_tail_rec_irg_pass
(
const
char
*name);
606
618
FIRM_API
void
opt_tail_recursion
(
void
);
619
627
FIRM_API
ir_prog_pass_t
*
opt_tail_recursion_pass
(
const
char
*name);
628
631
typedef
ir_type
*(*gen_pointer_type_to_func)(
ir_type
*tp);
632
658
FIRM_API
void
normalize_irp_class_casts
(
gen_pointer_type_to_func
gppt_fct);
659
667
FIRM_API
void
normalize_irg_class_casts
(
ir_graph
*irg,
668
gen_pointer_type_to_func
gppt_fct);
669
690
FIRM_API
void
optimize_class_casts
(
void
);
691
701
FIRM_API
void
combo
(
ir_graph
*irg);
702
710
FIRM_API
ir_graph_pass_t
*
combo_pass
(
const
char
*name);
711
731
FIRM_API
void
inline_small_irgs
(
ir_graph
*irg,
int
size);
732
741
FIRM_API
ir_graph_pass_t
*
inline_small_irgs_pass
(
const
char
*name,
int
size);
742
766
FIRM_API
void
inline_leaf_functions
(
unsigned
maxsize,
unsigned
leafsize,
767
unsigned
size,
int
ignore_runtime);
768
784
FIRM_API
ir_prog_pass_t
*
inline_leaf_functions_pass
(
const
char
*name,
785
unsigned
maxsize,
unsigned
leafsize,
unsigned
size,
786
int
ignore_runtime);
787
789
typedef
void (*
opt_ptr
)(
ir_graph
*irg);
790
802
FIRM_API
void
inline_functions
(
unsigned
maxsize,
int
inline_threshold,
803
opt_ptr
after_inline_opt);
804
820
FIRM_API
ir_prog_pass_t
*
inline_functions_pass
(
const
char
*name,
821
unsigned
maxsize,
int
inline_threshold,
opt_ptr
after_inline_opt);
822
828
FIRM_API
void
shape_blocks
(
ir_graph
*irg);
829
837
FIRM_API
ir_graph_pass_t
*
shape_blocks_pass
(
const
char
*name);
838
844
FIRM_API
void
do_loop_inversion
(
ir_graph
*irg);
845
851
FIRM_API
void
do_loop_unrolling
(
ir_graph
*irg);
852
856
FIRM_API
void
do_loop_peeling
(
ir_graph
*irg);
857
865
FIRM_API
ir_graph_pass_t
*
loop_inversion_pass
(
const
char
*name);
866
874
FIRM_API
ir_graph_pass_t
*
loop_unroll_pass
(
const
char
*name);
875
883
FIRM_API
ir_graph_pass_t
*
loop_peeling_pass
(
const
char
*name);
884
892
FIRM_API
ir_graph_pass_t
*
set_vrp_pass
(
const
char
*name);
893
902
FIRM_API
void
garbage_collect_entities
(
void
);
903
905
FIRM_API
ir_prog_pass_t
*
garbage_collect_entities_pass
(
const
char
*name);
906
926
FIRM_API
void
dead_node_elimination
(
ir_graph
*irg);
927
935
FIRM_API
ir_graph_pass_t
*
dead_node_elimination_pass
(
const
char
*name);
936
971
FIRM_API
int
inline_method
(
ir_node
*call,
ir_graph
*called_graph);
972
987
FIRM_API
void
place_code
(
ir_graph
*irg);
988
998
FIRM_API
ir_graph_pass_t
*
place_code_pass
(
const
char
*name);
999
1005
FIRM_API
void
fixpoint_vrp
(
ir_graph
*);
1006
1018
FIRM_API
ir_graph_pass_t
*
fixpoint_vrp_irg_pass
(
const
char
*name);
1019
1030
FIRM_API
int
value_not_zero
(
const
ir_node
*n,
const
ir_node
**confirm);
1031
1045
FIRM_API
int
value_not_null
(
const
ir_node
*n,
const
ir_node
**confirm);
1046
1054
FIRM_API
ir_value_classify_sign
classify_value_sign
(
ir_node
*n);
1055
1064
FIRM_API
ir_tarval
*
computed_value_Cmp_Confirm
(
1065
const
ir_node
*cmp,
ir_node
*left,
ir_node
*right,
ir_relation
relation);
1066
1068
typedef
ir_entity
*(*compilerlib_entity_creator_t)(
ident
*id,
ir_type
*mt);
1069
1076
FIRM_API
void
set_compilerlib_entity_creator
(
compilerlib_entity_creator_t
cb);
1077
1079
FIRM_API
compilerlib_entity_creator_t
get_compilerlib_entity_creator
(
void
);
1080
1088
FIRM_API
ir_entity
*
create_compilerlib_entity
(
ident
*
id
,
ir_type
*mt);
1089
1092
#include "
end.h
"
1093
1094
#endif
libfirm
iroptimize.h
Generated on Sat Nov 24 2012 19:13:48 for libFirm by
1.8.1.2