diff options
author | Richard Biener <rguenther@suse.de> | 2012-12-19 13:53:18 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-12-19 13:53:18 +0000 |
commit | d1f985421fff69c6956206f9606c4a9e35b32a70 (patch) | |
tree | 16f545224cd8116189b4ccd1992329c439c78de9 /gcc/ipa-prop.c | |
parent | c354951b7ef67f8bbbca3db79734db73880d17a2 (diff) | |
download | gcc-d1f985421fff69c6956206f9606c4a9e35b32a70.zip gcc-d1f985421fff69c6956206f9606c4a9e35b32a70.tar.gz gcc-d1f985421fff69c6956206f9606c4a9e35b32a70.tar.bz2 |
re PR lto/55736 (lto ICE: tree code ''junl is not supported in LTO streams)
2012-12-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/55736
PR tree-optimization/55703
* gimplify.c (prune_expr_location): New function.
(unshare_expr_without_location): Likewise.
* tree.h (unshare_expr_without_location): Declare.
* ipa-prop.c (prune_expression_for_jf): Remove.
(prune_expression_for_jf_1): Likewise.
(ipa_set_jf_constant): Use unshare_expr_without_location.
(ipa_set_jf_arith_pass_through): Likewise.
(determine_known_aggregate_parts): Likewise.
* tree-switch-conversion.c (build_constructors): Use
unshare_expr_without_location on all constructor elements.
* gcc.dg/lto/pr55703_0.c: New testcase.
From-SVN: r194609
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 4f887a0..d225b85 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -295,31 +295,6 @@ 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 -prune_expression_for_jf (tree exp) -{ - if (EXPR_P (exp)) - { - exp = unshare_expr (exp); - walk_tree (&exp, prune_expression_for_jf_1, NULL, NULL); - } - return exp; -} - /* Set JFUNC to be a known type jump function. */ static void @@ -341,7 +316,7 @@ ipa_set_jf_constant (struct ipa_jump_func *jfunc, tree constant) if (constant && EXPR_P (constant)) SET_EXPR_LOCATION (constant, UNKNOWN_LOCATION); jfunc->type = IPA_JF_CONST; - jfunc->value.constant = prune_expression_for_jf (constant); + jfunc->value.constant = unshare_expr_without_location (constant); } /* Set JFUNC to be a simple pass-through jump function. */ @@ -363,7 +338,7 @@ ipa_set_jf_arith_pass_through (struct ipa_jump_func *jfunc, int formal_id, tree operand, enum tree_code operation) { jfunc->type = IPA_JF_PASS_THROUGH; - jfunc->value.pass_through.operand = prune_expression_for_jf (operand); + jfunc->value.pass_through.operand = unshare_expr_without_location (operand); jfunc->value.pass_through.formal_id = formal_id; jfunc->value.pass_through.operation = operation; jfunc->value.pass_through.agg_preserved = false; @@ -1385,7 +1360,7 @@ determine_known_aggregate_parts (gimple call, tree arg, { struct ipa_agg_jf_item item; item.offset = list->offset - arg_offset; - item.value = prune_expression_for_jf (list->constant); + item.value = unshare_expr_without_location (list->constant); jfunc->agg.items->quick_push (item); } list = list->next; |