summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.h
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2014-08-21 11:32:21 +0200
committerMarc Glisse <glisse@gcc.gnu.org>2014-08-21 09:32:21 +0000
commit8cb65b3725f0c31a3ea5d5b8de37eacba55462f3 (patch)
tree773cf046c0dfd55437a213c2c0d6c24b378ad71e /gcc/tree-ssa-alias.h
parent31879c2cc7b5d8f302b5020de41b9439ef764b65 (diff)
re PR tree-optimization/62112 (Optimize out malloc when block is unused or write-only)
2014-08-21 Marc Glisse <marc.glisse@inria.fr> PR tree-optimization/62112 gcc/ * gimple-iterator.c (gsi_replace): Return whether EH cleanup is needed. * gimple-iterator.h (gsi_replace): Return bool. * tree-ssa-alias.c (ref_may_alias_global_p_1): New helper, code moved from ref_may_alias_global_p. (ref_may_alias_global_p, refs_may_alias_p, ref_maybe_used_by_stmt_p): New overloads. (ref_maybe_used_by_call_p): Take ao_ref* instead of tree. (stmt_kills_ref_p_1): Rename... (stmt_kills_ref_p): ... to this. * tree-ssa-alias.h (ref_may_alias_global_p, ref_maybe_used_by_stmt_p, stmt_kills_ref_p): Declare. * tree-ssa-dse.c (dse_possible_dead_store_p): New argument, use it. Move the self-assignment case... (dse_optimize_stmt): ... here. Handle builtin calls. Remove dead code. gcc/testsuite/ * gcc.dg/tree-ssa/pr62112-1.c: New file. * gcc.dg/tree-ssa/pr62112-2.c: Likewise. * gcc.c-torture/execute/pr35472.c: Add noclone attribute. * gcc.c-torture/execute/20071219-1.c: Likewise. From-SVN: r214262
Diffstat (limited to 'gcc/tree-ssa-alias.h')
-rw-r--r--gcc/tree-ssa-alias.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-ssa-alias.h b/gcc/tree-ssa-alias.h
index e46f89e7e25..436381a9519 100644
--- a/gcc/tree-ssa-alias.h
+++ b/gcc/tree-ssa-alias.h
@@ -101,17 +101,20 @@ extern alias_set_type ao_ref_alias_set (ao_ref *);
extern bool ptr_deref_may_alias_global_p (tree);
extern bool ptr_derefs_may_alias_p (tree, tree);
extern bool ref_may_alias_global_p (tree);
+extern bool ref_may_alias_global_p (ao_ref *);
extern bool refs_may_alias_p (tree, tree);
extern bool refs_may_alias_p_1 (ao_ref *, ao_ref *, bool);
extern bool refs_anti_dependent_p (tree, tree);
extern bool refs_output_dependent_p (tree, tree);
extern bool ref_maybe_used_by_stmt_p (gimple, tree);
+extern bool ref_maybe_used_by_stmt_p (gimple, ao_ref *);
extern bool stmt_may_clobber_global_p (gimple);
extern bool stmt_may_clobber_ref_p (gimple, tree);
extern bool stmt_may_clobber_ref_p_1 (gimple, ao_ref *);
extern bool call_may_clobber_ref_p (gimple, tree);
extern bool call_may_clobber_ref_p_1 (gimple, ao_ref *);
extern bool stmt_kills_ref_p (gimple, tree);
+extern bool stmt_kills_ref_p (gimple, ao_ref *);
extern tree get_continuation_for_phi (gimple, ao_ref *,
unsigned int *, bitmap *, bool,
void *(*)(ao_ref *, tree, void *, bool),