/* reassoc = */ TRUE,
/* cse = */ TRUE,
/* control_flow = */ TRUE,
+ /* combo; = */ FALSE,
/* gcse = */ TRUE,
/* gvn_pre = */ FALSE,
/* cond_eval = */ FALSE,
{ X("no-const-fold"), &firm_opt.const_folding, 0, "firm: disable constant folding" },
{ X("control_flow"), &firm_opt.control_flow, 1, "firm: enable control flow optimization" },
{ X("no-control-flow"), &firm_opt.control_flow, 0, "firm: disable control flow optimization" },
+ { X("combo"), &firm_opt.combo, 1, "firm: enable combined CCE, UCE and GVN" },
+ { X("no-combo"), &firm_opt.combo, 0, "firm: disable combined CCE, UCE and GVN" },
{ X("gcse"), &firm_opt.gcse, 1, "firm: enable global common subexpression elimination" },
{ X("no-gcse"), &firm_opt.gcse, 0, "firm: disable global common subexpression elimination" },
{ X("gvn-pre"), &firm_opt.gvn_pre, 1, "firm: enable GVN partial redundancy elimination" },
timer_start(TV_ALL_OPT);
- if (firm_opt.remove_unused) {
- ir_entity **keep_methods;
- int arr_len;
-
- /* Analysis that finds the free methods,
- i.e. methods that are dereferenced.
- Optimizes polymorphic calls :-). */
- cgana(&arr_len, &keep_methods);
-
- /* Remove methods that are never called. */
- gc_irgs(arr_len, keep_methods);
-
- free(keep_methods);
- }
-
if (! firm_opt.freestanding) {
rts_map();
DUMP_ALL_C(firm_dump.ir_graph && firm_dump.all_phases, "rts");
CHECK_ALL(firm_opt.check_all);
}
+ if (firm_opt.combo) {
+ for (i = 0; i < get_irp_n_irgs(); i++) {
+ timer_push(TV_COMBO);
+ irg = get_irp_irg(i);
+ combo(irg);
+ timer_pop();
+ DUMP_ONE_C(firm_dump.ir_graph && firm_dump.all_phases, irg, "combo");
+ CHECK_ONE(firm_opt.check_all, irg);
+ }
+ }
+
/* first step: kill dead code */
for (i = 0; i < get_irp_n_irgs(); i++) {
irg = current_ir_graph = get_irp_irg(i);
timer_pop();
}
+ if (firm_opt.remove_unused) {
+ ir_entity **keep_methods;
+ int arr_len;
+
+ timer_push(TV_CGANA);
+ /* Analysis that finds the free methods,
+ i.e. methods that are dereferenced.
+ Optimizes polymorphic calls :-). */
+ cgana(&arr_len, &keep_methods);
+
+ /* Remove methods that are never called. */
+ gc_irgs(arr_len, keep_methods);
+
+ free(keep_methods);
+ timer_pop();
+ }
+
+ if (firm_opt.tail_rec) {
+ timer_push(TV_TAIL_REC);
+ opt_tail_recursion();
+ timer_pop();
+
+ DUMP_ALL_C(firm_dump.ir_graph && firm_dump.all_phases, "tail_rec");
+ CHECK_ALL(firm_opt.check_all);
+ }
if (firm_opt.func_calls) {
timer_push(TV_REAL_FUNC_CALL);
optimize_funccalls(firm_const_exists, NULL);
DUMP_ALL_C(firm_dump.ir_graph && firm_dump.all_phases, "clone");
CHECK_ALL(firm_opt.check_all);
}
- if (firm_opt.tail_rec) {
- timer_push(TV_TAIL_REC);
- opt_tail_recursion();
- timer_pop();
-
- DUMP_ALL_C(firm_dump.ir_graph && firm_dump.all_phases, "tail_rec");
- CHECK_ALL(firm_opt.check_all);
- }
if (firm_opt.cond_eval) {
for (i = 0; i < get_irp_n_irgs(); i++) {
ir_entity **keep_methods;
int arr_len;
+ timer_push(TV_CGANA);
/* Analysis that finds the free methods,
i.e. methods that are dereferenced.
Optimizes polymorphic calls :-). */
gc_irgs(arr_len, keep_methods);
free(keep_methods);
+ timer_pop();
}
stat_dump_snapshot(input_filename, "noopt");
}
- if (firm_opt.enabled) {
+ if (firm_opt.enabled)
do_firm_optimizations(input_filename, firm_const_exists);
- //do_firm_optimizations(input_filename, firm_const_exists);
- //do_firm_optimizations(input_filename, firm_const_exists);
- }
if (firm_dump.gen_firm_asm) {
timer_push(TV_FIRM_ASM);
*
* (C) 2006 Michael Beck beck@ipd.info.uni-karlsruhe.de
*
- * $Id: firm_timing.def 14048 2007-05-26 10:43:19Z mallon $
+ * $Id: firm_timing.def 20710 2008-07-26 19:59:07Z beck $
*/
DEFTIMEVAR(TV_ALL_OPT , "allopt", "Firm: all optimizations")
DEFTIMEVAR(TV_VALUE_NUM , "valnum", "Firm: value numbers")
DEFTIMEVAR(TV_CREATE , "create", "Firm: creation")
+DEFTIMEVAR(TV_COMBO , "combo", "Firm: combo")
DEFTIMEVAR(TV_INLINE , "inline", "Firm: inlining")
DEFTIMEVAR(TV_TAIL_REC , "tailrec", "Firm: tail-recursion")
DEFTIMEVAR(TV_COMP_DOMS , "doms", "Firm: compute doms")