diff options
author | Richard Guenther <rguenther@suse.de> | 2008-03-14 14:52:07 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-03-14 14:52:07 +0000 |
commit | 3d45dd59c7fcad07ddec7a45d91eb3b7d31897a8 (patch) | |
tree | 0508ac0fafc550eb92cb66bcb48ef0d5a3af1d88 /gcc/ChangeLog | |
parent | c539732f969e784725ca51dd9ff66b32a2c198cd (diff) | |
download | gcc-3d45dd59c7fcad07ddec7a45d91eb3b7d31897a8.zip gcc-3d45dd59c7fcad07ddec7a45d91eb3b7d31897a8.tar.gz gcc-3d45dd59c7fcad07ddec7a45d91eb3b7d31897a8.tar.bz2 |
re PR tree-optimization/34043 (Missed optimization causing extra loads and stores when using x86_64 builtin function together with aggregate types.)
2008-03-14 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34043
PR tree-optimization/33989
* tree-ssa-pre.c (execute_pre): Allow SCCVN to do insertion
when doing FRE.
(bitmap_find_leader): Use extra argument to verify dominance
relationship inside a basic-block.
(can_PRE_operation): Add VIEW_CONVERT_EXPR.
(find_leader_in_sets): Adjust.
(create_component_ref_by_pieces): Take extra argument for
dominance check, handle lookup failures.
(find_or_generate_expression): Likewise.
(create_expression_by_pieces): Likewise.
(insert_into_preds_of_block): Adjust.
(create_value_expr_from): If asked for, verify all operands
are in the blocks AVAIL_OUT set.
(make_values_for_stmt): Check for SSA_NAMEs that are life
over an abnormal edge.
(compute_avail): Remove such check.
(do_SCCVN_insertion): New function.
(eliminate): If we do not find a leader suitable for replacement
insert a replacement expression from SCCVN if available.
* tree-ssa-sccvn.h (run_scc_vn): Update prototype.
(struct vn_ssa_aux): Add needs_insertion flag.
* tree-ssa-sccvn.c (may_insert): New global flag.
(copy_reference_ops_from_ref): Value-number union member access
based on its size, not type and member if insertion is allowed.
(visit_reference_op_load): For a weak match from union type
punning lookup a view-converted value and insert a SSA_NAME
for that value if that is not found.
(visit_use): Make dumps shorter. Do not disallow value numbering
SSA_NAMEs that are life over an abnormal edge to constants.
(free_scc_vn): Release inserted SSA_NAMEs.
(run_scc_vn): New flag to specify whether insertion is allowed.
Process SSA_NAMEs in forward order.
* tree-ssa-loop-im.c (for_each_index): Handle invariant
ADDR_EXPRs inside VIEW_CONVERT_EXPR.
* fold-const.c (fold_unary): Fold VIEW_CONVERT_EXPRs from/to
pointer type to/from integral types that do not change the
precision to regular conversions.
* gcc.dg/tree-ssa/ssa-fre-7.c: New testcase.
* gcc.dg/tree-ssa/ssa-fre-8.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-9.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-10.c: Likewise.
* gcc.dg/tree-ssa/ssa-pre-17.c: Likewise.
From-SVN: r133218
Diffstat (limited to 'gcc/ChangeLog')
-rw-r--r-- | gcc/ChangeLog | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7eb3e89..3178dae 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,45 @@ +2008-03-14 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/34043 + PR tree-optimization/33989 + * tree-ssa-pre.c (execute_pre): Allow SCCVN to do insertion + when doing FRE. + (bitmap_find_leader): Use extra argument to verify dominance + relationship inside a basic-block. + (can_PRE_operation): Add VIEW_CONVERT_EXPR. + (find_leader_in_sets): Adjust. + (create_component_ref_by_pieces): Take extra argument for + dominance check, handle lookup failures. + (find_or_generate_expression): Likewise. + (create_expression_by_pieces): Likewise. + (insert_into_preds_of_block): Adjust. + (create_value_expr_from): If asked for, verify all operands + are in the blocks AVAIL_OUT set. + (make_values_for_stmt): Check for SSA_NAMEs that are life + over an abnormal edge. + (compute_avail): Remove such check. + (do_SCCVN_insertion): New function. + (eliminate): If we do not find a leader suitable for replacement + insert a replacement expression from SCCVN if available. + * tree-ssa-sccvn.h (run_scc_vn): Update prototype. + (struct vn_ssa_aux): Add needs_insertion flag. + * tree-ssa-sccvn.c (may_insert): New global flag. + (copy_reference_ops_from_ref): Value-number union member access + based on its size, not type and member if insertion is allowed. + (visit_reference_op_load): For a weak match from union type + punning lookup a view-converted value and insert a SSA_NAME + for that value if that is not found. + (visit_use): Make dumps shorter. Do not disallow value numbering + SSA_NAMEs that are life over an abnormal edge to constants. + (free_scc_vn): Release inserted SSA_NAMEs. + (run_scc_vn): New flag to specify whether insertion is allowed. + Process SSA_NAMEs in forward order. + * tree-ssa-loop-im.c (for_each_index): Handle invariant + ADDR_EXPRs inside VIEW_CONVERT_EXPR. + * fold-const.c (fold_unary): Fold VIEW_CONVERT_EXPRs from/to + pointer type to/from integral types that do not change the + precision to regular conversions. + 2008-03-13 Uros Bizjak <ubizjak@gmail.com> * doc/extend.texi (X86 Built-in Functions) [__builtin_ia32_psll?, |