* [PATCH] Fix LTO bootstrap (PR54876)
@ 2012-10-10 8:39 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2012-10-10 8:39 UTC (permalink / raw)
To: gcc-patches
The previous fix for clearing EXPR_LOCATION (and thus LOCATION_BLOCK)
from jump functions was incomplete as it didn't consider sub-expressions.
Fixed as follows.
LTO bootstrapped on x86_64-unknown-linux-gnu, applied to trunk.
Richard.
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.
Index: gcc/ipa-prop.c
===================================================================
--- gcc/ipa-prop.c (revision 192255)
+++ gcc/ipa-prop.c (working copy)
@@ -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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-10-10 8:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-10 8:39 [PATCH] Fix LTO bootstrap (PR54876) Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).