aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-utils.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-02-11 09:13:03 +0100
committerMartin Liska <marxin@gcc.gnu.org>2019-02-11 08:13:03 +0000
commit45272fd22f6f77463d46751acf1c7ceeeeec0689 (patch)
tree95f7ce40eb7def7277d7c336333d75586a810a33 /gcc/ipa-utils.c
parentd29cce74b2f2e5b49d09e8b8ad2b67db21c62ac8 (diff)
downloadgcc-45272fd22f6f77463d46751acf1c7ceeeeec0689.zip
gcc-45272fd22f6f77463d46751acf1c7ceeeeec0689.tar.gz
gcc-45272fd22f6f77463d46751acf1c7ceeeeec0689.tar.bz2
Construct ipa_reduced_postorder always for overwritable (PR ipa/89009).
2019-02-11 Martin Liska <mliska@suse.cz> PR ipa/89009 * ipa-cp.c (build_toporder_info): Remove usage of a param. * ipa-inline.c (inline_small_functions): Likewise. * ipa-pure-const.c (propagate_pure_const): Likewise. (propagate_nothrow): Likewise. * ipa-reference.c (propagate): Likewise. * ipa-utils.c (struct searchc_env): Remove unused field. (searchc): Always search across AVAIL_INTERPOSABLE. (ipa_reduced_postorder): Always allow AVAIL_INTERPOSABLE as the only called IPA pure const can properly not propagate across interposable boundary. * ipa-utils.h (ipa_reduced_postorder): Remove param. 2019-02-11 Martin Liska <mliska@suse.cz> PR ipa/89009 * g++.dg/ipa/pr89009.C: New test. From-SVN: r268762
Diffstat (limited to 'gcc/ipa-utils.c')
-rw-r--r--gcc/ipa-utils.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/ipa-utils.c b/gcc/ipa-utils.c
index aebcb8e..79b250c 100644
--- a/gcc/ipa-utils.c
+++ b/gcc/ipa-utils.c
@@ -63,7 +63,6 @@ struct searchc_env {
int order_pos;
splay_tree nodes_marked_new;
bool reduce;
- bool allow_overwritable;
int count;
};
@@ -105,7 +104,7 @@ searchc (struct searchc_env* env, struct cgraph_node *v,
if (w->aux
&& (avail > AVAIL_INTERPOSABLE
- || (env->allow_overwritable && avail == AVAIL_INTERPOSABLE)))
+ || avail == AVAIL_INTERPOSABLE))
{
w_info = (struct ipa_dfs_info *) w->aux;
if (w_info->new_node)
@@ -162,7 +161,7 @@ searchc (struct searchc_env* env, struct cgraph_node *v,
int
ipa_reduced_postorder (struct cgraph_node **order,
- bool reduce, bool allow_overwritable,
+ bool reduce,
bool (*ignore_edge) (struct cgraph_edge *))
{
struct cgraph_node *node;
@@ -175,15 +174,13 @@ ipa_reduced_postorder (struct cgraph_node **order,
env.nodes_marked_new = splay_tree_new (splay_tree_compare_ints, 0, 0);
env.count = 1;
env.reduce = reduce;
- env.allow_overwritable = allow_overwritable;
FOR_EACH_DEFINED_FUNCTION (node)
{
enum availability avail = node->get_availability ();
if (avail > AVAIL_INTERPOSABLE
- || (allow_overwritable
- && (avail == AVAIL_INTERPOSABLE)))
+ || avail == AVAIL_INTERPOSABLE)
{
/* Reuse the info if it is already there. */
struct ipa_dfs_info *info = (struct ipa_dfs_info *) node->aux;