Skip to content

Commit

Permalink
2012-10-10 Richard Biener <rguenther@suse.de>
Browse files Browse the repository at this point in the history
	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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192293 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
rguenth committed Oct 10, 2012
1 parent 1e0cc9e commit e56fb1c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
7 changes: 7 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
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.

2012-10-10 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>

* config.gcc: Enable zEC12 for with-arch and with-tune
Expand Down
14 changes: 13 additions & 1 deletion gcc/ipa-prop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
Expand Down

0 comments on commit e56fb1c

Please sign in to comment.