diff options
author | Richard Henderson <rth@redhat.com> | 2005-06-09 00:43:40 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2005-06-09 00:43:40 -0700 |
commit | e41d82f5d776d2d4ddf1a4346e63213da455edad (patch) | |
tree | 003bf598fc6be666e758e157426518abcb2fef62 /gcc/tree.h | |
parent | 31920d83c2940d00b1c91d820016c6c67523cf60 (diff) | |
download | gcc-e41d82f5d776d2d4ddf1a4346e63213da455edad.zip gcc-e41d82f5d776d2d4ddf1a4346e63213da455edad.tar.gz gcc-e41d82f5d776d2d4ddf1a4346e63213da455edad.tar.bz2 |
re PR tree-optimization/20610 (Real by complex multiplications perform unnecessary operations)
PR tree-opt/20610
* tree.h (DECL_COMPLEX_GIMPLE_REG_P): New.
(struct tree_decl): Add gimple_reg_flag.
* integrate.c (copy_decl_for_inlining): Copy it.
* gimplify.c (internal_get_tmp_var): Set it.
(gimplify_bind_expr): Likewise.
(gimplify_function_tree): Likewise.
(gimplify_modify_expr_complex_part): New.
(gimplify_modify_expr): Use it.
* tree-gimple.c (is_gimple_reg_type): Allow complex.
(is_gimple_reg): Allow complex with DECL_COMPLEX_GIMPLE_REG_P set.
* tree-complex.c (complex_lattice_t): New.
(complex_lattice_values, complex_variable_components): New.
(some_nonzerop, find_lattice_value, is_complex_reg,
init_parameter_lattice_values, init_dont_simulate_again,
complex_visit_stmt, complex_visit_phi, create_components,
update_complex_components, update_parameter_components,
update_phi_components, update_all_vops, expand_complex_move): New.
(extract_component): Handle INDIRECT_REF, COMPONENT_REF, ARRAY_REF,
SSA_NAME.
(update_complex_assignment): Use update_complex_components;
handle updates of return_expr properly.
(expand_complex_addition): Use complex lattice values.
(expand_complex_multiplication): Likewise.
(expand_complex_division): Likewise.
(expand_complex_libcall): Use update_complex_components.
(expand_complex_comparison): Use update_stmt.
(expand_complex_operations_1): Use expand_complex_move, retrieve
lattice values.
(tree_lower_complex): Compute lattice values.
(tree_lower_complex_O0): Duplicate from tree_lower_complex.
(pass_lower_complex_O0): Rename from pass_lower_complex.
(pass_lower_complex, gate_no_optimization): New.
* tree-optimize.c (init_tree_optimization_passes): Update for
complex pass changes.
* tree-pass.h (pass_lower_complex_O0): Declare.
From-SVN: r100793
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -2353,6 +2353,14 @@ extern void decl_value_expr_insert (tree, tree); #define DECL_GIMPLE_FORMAL_TEMP_P(DECL) \ DECL_CHECK (DECL)->decl.gimple_formal_temp +/* For function local variables of COMPLEX type, indicates that the + variable is not aliased, and that all modifications to the variable + have been adjusted so that they are killing assignments. Thus the + variable may now be treated as a GIMPLE register, and use real + instead of virtual ops in SSA form. */ +#define DECL_COMPLEX_GIMPLE_REG_P(DECL) \ + DECL_CHECK (DECL)->decl.gimple_reg_flag + /* Enumerate visibility settings. */ #ifndef SYMBOL_VISIBILITY_DEFINED #define SYMBOL_VISIBILITY_DEFINED @@ -2424,8 +2432,9 @@ struct tree_decl GTY(()) unsigned returns_twice_flag : 1; unsigned seen_in_bind_expr : 1; unsigned novops_flag : 1; - unsigned has_value_expr:1; - /* 8 unused bits. */ + unsigned has_value_expr : 1; + unsigned gimple_reg_flag : 1; + /* 7 unused bits. */ union tree_decl_u1 { /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is |