summaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r--gcc/ipa-prop.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index fb2346bdc45..714dd8f7bcb 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -287,6 +287,18 @@ ipa_print_all_jump_functions (FILE *f)
}
}
+/* Worker for prune_expression_for_jf. */
+
+static tree
+prune_expression_for_jf_1 (tree *tp, int *walk_subtrees, void *)
+{
+ if (EXPR_P (*tp))
+ SET_EXPR_LOCATION (*tp, UNKNOWN_LOCATION);
+ else
+ *walk_subtrees = 0;
+ return NULL_TREE;
+}
+
/* Return the expression tree EXPR unshared and with location stripped off. */
static tree
@@ -295,7 +307,7 @@ prune_expression_for_jf (tree exp)
if (EXPR_P (exp))
{
exp = unshare_expr (exp);
- SET_EXPR_LOCATION (exp, UNKNOWN_LOCATION);
+ walk_tree (&exp, prune_expression_for_jf_1, NULL, NULL);
}
return exp;
}