summaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-09 23:38:23 +0000
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-09 23:38:23 +0000
commitc52cb4395f97f94cb92b62840af21ce7b158118d (patch)
tree951106b686b0e34fa68f8a0a3c5bed5ca6806875 /gcc/ipa-cp.c
parentbc89031cf0beae48e4b095f5d57befc9546911d3 (diff)
downloadgcc-c52cb4395f97f94cb92b62840af21ce7b158118d.tar.gz
2010-09-10 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/44972 * tree-sra.c: Include toplev.h. (build_ref_for_offset): Entirely reimplemented. (build_ref_for_model): New function. (build_user_friendly_ref_for_offset): New function. (analyze_access_subtree): Removed build_ref_for_offset check. (propagate_subaccesses_across_link): Likewise. (create_artificial_child_access): Use build_user_friendly_ref_for_offset. (propagate_subaccesses_across_link): Likewise. (ref_expr_for_all_replacements_p): Removed. (generate_subtree_copies): Updated comment. Use build_ref_for_model. (sra_modify_expr): Use build_ref_for_model. (load_assign_lhs_subreplacements): Likewise. (sra_modify_assign): Removed ref_expr_for_all_replacements_p checks, checks for return values of build_ref_for_offset. * ipa-cp.c (ipcp_lattice_from_jfunc): No need to check return value of build_ref_for_offset. * ipa-prop.h: Include gimple.h * ipa-prop.c (ipa_compute_jump_functions): Update to look for MEM_REFs. (ipa_analyze_indirect_call_uses): Update comment. * Makefile.in (tree-sra.o): Add $(GIMPLE_H) to dependencies. (IPA_PROP_H): Likewise. * testsuite/gcc.dg/ipa/ipa-sra-1.c: Adjust scanning expressions. * testsuite/gcc.dg/tree-ssa/pr45144.c: Likewise. * testsuite/gcc.dg/tree-ssa/forwprop-5.c: Likewise and scan optimzed dump instead. * testsuite/g++.dg/torture/pr44972.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164136 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r--gcc/ipa-cp.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index e94fdca9d3b..0680e3254d6 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -327,7 +327,6 @@ ipcp_lattice_from_jfunc (struct ipa_node_params *info, struct ipcp_lattice *lat,
{
struct ipcp_lattice *caller_lat;
tree t;
- bool ok;
caller_lat = ipcp_get_lattice (info, jfunc->value.ancestor.formal_id);
lat->type = caller_lat->type;
@@ -340,16 +339,9 @@ ipcp_lattice_from_jfunc (struct ipa_node_params *info, struct ipcp_lattice *lat,
return;
}
t = TREE_OPERAND (caller_lat->constant, 0);
- ok = build_ref_for_offset (&t, TREE_TYPE (t),
- jfunc->value.ancestor.offset,
- jfunc->value.ancestor.type, false);
- if (!ok)
- {
- lat->type = IPA_BOTTOM;
- lat->constant = NULL_TREE;
- }
- else
- lat->constant = build_fold_addr_expr (t);
+ t = build_ref_for_offset (t, jfunc->value.ancestor.offset,
+ jfunc->value.ancestor.type, NULL, false);
+ lat->constant = build_fold_addr_expr (t);
}
else
lat->type = IPA_BOTTOM;