aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2012-10-10 08:48:47 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-10-10 08:48:47 +0000
commit176ae843e6fb30c60ee020accacb5e3cf95e3c77 (patch)
tree541ed7eca973e3be3b5881bab892fef281d9fc67 /gcc/ipa-prop.c
parentb46dbc6cc83e38dd5b1b9596844660a8f769fbd0 (diff)
downloadgcc-176ae843e6fb30c60ee020accacb5e3cf95e3c77.zip
gcc-176ae843e6fb30c60ee020accacb5e3cf95e3c77.tar.gz
gcc-176ae843e6fb30c60ee020accacb5e3cf95e3c77.tar.bz2
re PR bootstrap/54876 (LTO bootstrap broken, streaming garbage-collected BLOCK)
2012-10-10 Richard Biener <rguenther@suse.de> PR middle-end/54876 * ipa-prop.c (prune_expression_for_jf_1): New function. (prune_expression_for_jf): Clear EXPR_LOCATION for all sub-expressions as well. From-SVN: r192293
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 fb2346b..714dd8f 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;
}