diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-13 10:07:47 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-13 10:07:47 +0000 |
commit | 7b76dcb9d8a0a1542d23bde7d2b241983f928c6e (patch) | |
tree | 76a66b356728d78d55e273dfdd2f9ffb112f4a4b /gcc/tree-complex.c | |
parent | 15ecedf927115065978320471d1232ca1805808b (diff) | |
download | gcc-7b76dcb9d8a0a1542d23bde7d2b241983f928c6e.tar.gz |
2010-01-13 Richard Guenther <rguenther@suse.de>
PR lto/42678
* tree-pass.h (PROP_gimple_lcx): New.
* cfgexpand.c (pass_expand): Require PROP_gimple_lcx.
* passes.c (init_optimization_passes): Move pass_lower_complex_O0
before the final cleanup_eh.
(dump_properties): Dump PROP_gimple_lcx.
* tree-complex.c (pass_lower_complex): Provide PROP_gimple_lcx.
(tree_lower_complex_O0): Remove.
(gate_no_optimization): Run if PROP_gimple_lcx is not set.
(pass_lower_complex_O0): Provide PROP_gimple_lcx. Run
tree_lower_complex, schedule TODO_update_ssa.
* lto-streamer-out.c (output_function): Stream the functions
properties.
* lto-streamer-in.c (input_function): Likewise.
(lto_read_body): Do not override them here.
* gfortran.dg/lto/20100110-1_0.f90: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155853 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-complex.c')
-rw-r--r-- | gcc/tree-complex.c | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c index 53bf1185495..ea0a651bfea 100644 --- a/gcc/tree-complex.c +++ b/gcc/tree-complex.c @@ -1622,7 +1622,7 @@ struct gimple_opt_pass pass_lower_complex = 0, /* static_pass_number */ TV_NONE, /* tv_id */ PROP_ssa, /* properties_required */ - 0, /* properties_provided */ + PROP_gimple_lcx, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_dump_func @@ -1633,32 +1633,12 @@ struct gimple_opt_pass pass_lower_complex = }; -/* Entry point for complex operation lowering without optimization. */ - -static unsigned int -tree_lower_complex_O0 (void) -{ - int old_last_basic_block = last_basic_block; - gimple_stmt_iterator gsi; - basic_block bb; - - FOR_EACH_BB (bb) - { - if (bb->index >= old_last_basic_block) - continue; - - for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) - expand_complex_operations_1 (&gsi); - } - return 0; -} - static bool gate_no_optimization (void) { /* With errors, normal optimization passes are not run. If we don't lower complex operations at all, rtl expansion will abort. */ - return optimize == 0 || sorrycount || errorcount; + return !(cfun->curr_properties & PROP_gimple_lcx); } struct gimple_opt_pass pass_lower_complex_O0 = @@ -1667,16 +1647,18 @@ struct gimple_opt_pass pass_lower_complex_O0 = GIMPLE_PASS, "cplxlower0", /* name */ gate_no_optimization, /* gate */ - tree_lower_complex_O0, /* execute */ + tree_lower_complex, /* execute */ NULL, /* sub */ NULL, /* next */ 0, /* static_pass_number */ TV_NONE, /* tv_id */ PROP_cfg, /* properties_required */ - 0, /* properties_provided */ + PROP_gimple_lcx, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - TODO_dump_func | TODO_ggc_collect - | TODO_verify_stmts, /* todo_flags_finish */ + TODO_dump_func + | TODO_ggc_collect + | TODO_update_ssa + | TODO_verify_stmts /* todo_flags_finish */ } }; |