comparison gcc/tree-complex.c @ 63:b7f97abdc517 gcc-4.6-20100522

update gcc from gcc-4.5.0 to gcc-4.6
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Mon, 24 May 2010 12:47:05 +0900
parents 77e2b8dfacca
children f6334be47118
comparison
equal deleted inserted replaced
56:3c8a44c06a95 63:b7f97abdc517
1 /* Lower complex number operations to scalar operations. 1 /* Lower complex number operations to scalar operations.
2 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 2 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5 This file is part of GCC. 5 This file is part of GCC.
6 6
7 GCC is free software; you can redistribute it and/or modify it 7 GCC is free software; you can redistribute it and/or modify it
21 #include "config.h" 21 #include "config.h"
22 #include "system.h" 22 #include "system.h"
23 #include "coretypes.h" 23 #include "coretypes.h"
24 #include "tm.h" 24 #include "tm.h"
25 #include "tree.h" 25 #include "tree.h"
26 #include "rtl.h"
27 #include "real.h"
28 #include "flags.h" 26 #include "flags.h"
29 #include "tree-flow.h" 27 #include "tree-flow.h"
30 #include "gimple.h" 28 #include "gimple.h"
31 #include "tree-iterator.h" 29 #include "tree-iterator.h"
32 #include "tree-pass.h" 30 #include "tree-pass.h"
1620 NULL, /* sub */ 1618 NULL, /* sub */
1621 NULL, /* next */ 1619 NULL, /* next */
1622 0, /* static_pass_number */ 1620 0, /* static_pass_number */
1623 TV_NONE, /* tv_id */ 1621 TV_NONE, /* tv_id */
1624 PROP_ssa, /* properties_required */ 1622 PROP_ssa, /* properties_required */
1625 0, /* properties_provided */ 1623 PROP_gimple_lcx, /* properties_provided */
1626 0, /* properties_destroyed */ 1624 0, /* properties_destroyed */
1627 0, /* todo_flags_start */ 1625 0, /* todo_flags_start */
1628 TODO_dump_func 1626 TODO_dump_func
1629 | TODO_ggc_collect 1627 | TODO_ggc_collect
1630 | TODO_update_ssa 1628 | TODO_update_ssa
1631 | TODO_verify_stmts /* todo_flags_finish */ 1629 | TODO_verify_stmts /* todo_flags_finish */
1632 } 1630 }
1633 }; 1631 };
1634 1632
1635 1633
1636 /* Entry point for complex operation lowering without optimization. */
1637
1638 static unsigned int
1639 tree_lower_complex_O0 (void)
1640 {
1641 int old_last_basic_block = last_basic_block;
1642 gimple_stmt_iterator gsi;
1643 basic_block bb;
1644
1645 FOR_EACH_BB (bb)
1646 {
1647 if (bb->index >= old_last_basic_block)
1648 continue;
1649
1650 for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
1651 expand_complex_operations_1 (&gsi);
1652 }
1653 return 0;
1654 }
1655
1656 static bool 1634 static bool
1657 gate_no_optimization (void) 1635 gate_no_optimization (void)
1658 { 1636 {
1659 /* With errors, normal optimization passes are not run. If we don't 1637 /* With errors, normal optimization passes are not run. If we don't
1660 lower complex operations at all, rtl expansion will abort. */ 1638 lower complex operations at all, rtl expansion will abort. */
1661 return optimize == 0 || sorrycount || errorcount; 1639 return !(cfun->curr_properties & PROP_gimple_lcx);
1662 } 1640 }
1663 1641
1664 struct gimple_opt_pass pass_lower_complex_O0 = 1642 struct gimple_opt_pass pass_lower_complex_O0 =
1665 { 1643 {
1666 { 1644 {
1667 GIMPLE_PASS, 1645 GIMPLE_PASS,
1668 "cplxlower0", /* name */ 1646 "cplxlower0", /* name */
1669 gate_no_optimization, /* gate */ 1647 gate_no_optimization, /* gate */
1670 tree_lower_complex_O0, /* execute */ 1648 tree_lower_complex, /* execute */
1671 NULL, /* sub */ 1649 NULL, /* sub */
1672 NULL, /* next */ 1650 NULL, /* next */
1673 0, /* static_pass_number */ 1651 0, /* static_pass_number */
1674 TV_NONE, /* tv_id */ 1652 TV_NONE, /* tv_id */
1675 PROP_cfg, /* properties_required */ 1653 PROP_cfg, /* properties_required */
1676 0, /* properties_provided */ 1654 PROP_gimple_lcx, /* properties_provided */
1677 0, /* properties_destroyed */ 1655 0, /* properties_destroyed */
1678 0, /* todo_flags_start */ 1656 0, /* todo_flags_start */
1679 TODO_dump_func | TODO_ggc_collect 1657 TODO_dump_func
1680 | TODO_verify_stmts, /* todo_flags_finish */ 1658 | TODO_ggc_collect
1659 | TODO_update_ssa
1660 | TODO_verify_stmts /* todo_flags_finish */
1681 } 1661 }
1682 }; 1662 };