diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-14 14:52:07 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-14 14:52:07 +0000 |
commit | 1d9353f38b1812c2edf869fc6abf08cdeaa845a1 (patch) | |
tree | 0508ac0fafc550eb92cb66bcb48ef0d5a3af1d88 /gcc/tree-ssa-loop-im.c | |
parent | bbe6c295cf3aefba0f84f2fc1d1088637dc60930 (diff) | |
download | gcc-1d9353f38b1812c2edf869fc6abf08cdeaa845a1.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133218 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-im.c')
-rw-r--r-- | gcc/tree-ssa-loop-im.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c index cad14452a16..91c18174bc0 100644 --- a/gcc/tree-ssa-loop-im.c +++ b/gcc/tree-ssa-loop-im.c @@ -208,6 +208,10 @@ for_each_index (tree *addr_p, bool (*cbck) (tree, tree *, void *), void *data) case CONSTRUCTOR: return true; + case ADDR_EXPR: + gcc_assert (is_gimple_min_invariant (*addr_p)); + return true; + case TARGET_MEM_REF: idx = &TMR_BASE (*addr_p); if (*idx |