aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-chrec.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2018-10-18 08:51:32 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2018-10-18 08:51:32 +0000
commit39f7ea2368560f87a4b5f6a635f23814e58d8444 (patch)
tree333dd924a7d596bc8316cfab2d17de498a6854a9 /gcc/tree-chrec.c
parent4cb439c3ab595b5f33cf9b28e05aa8e3787ad683 (diff)
downloadgcc-39f7ea2368560f87a4b5f6a635f23814e58d8444.zip
gcc-39f7ea2368560f87a4b5f6a635f23814e58d8444.tar.gz
gcc-39f7ea2368560f87a4b5f6a635f23814e58d8444.tar.bz2
re PR tree-optimization/87087 (Optimization hangs up and consumes over 15Gb of memory)
2018-10-18 Richard Biener <rguenther@suse.de> PR middle-end/87087 Revert 2018-02-07 Richard Biener <rguenther@suse.de> PR tree-optimization/84204 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in this place. * gcc.dg/torture/pr87087.c: New testcase. * gcc.dg/graphite/pr84204.c: XFAIL. * gcc.dg/graphite/pr85935.c: Likewise. From-SVN: r265262
Diffstat (limited to 'gcc/tree-chrec.c')
-rw-r--r--gcc/tree-chrec.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/tree-chrec.c b/gcc/tree-chrec.c
index 04d33ef..896ff35 100644
--- a/gcc/tree-chrec.c
+++ b/gcc/tree-chrec.c
@@ -375,10 +375,12 @@ chrec_fold_plus_1 (enum tree_code code, tree type,
default:
{
- if (tree_contains_chrecs (op0, NULL)
- || tree_contains_chrecs (op1, NULL))
+ int size = 0;
+ if ((tree_contains_chrecs (op0, &size)
+ || tree_contains_chrecs (op1, &size))
+ && size < PARAM_VALUE (PARAM_SCEV_MAX_EXPR_SIZE))
return build2 (code, type, op0, op1);
- else
+ else if (size < PARAM_VALUE (PARAM_SCEV_MAX_EXPR_SIZE))
{
if (code == POINTER_PLUS_EXPR)
return fold_build_pointer_plus (fold_convert (type, op0),
@@ -388,6 +390,8 @@ chrec_fold_plus_1 (enum tree_code code, tree type,
fold_convert (type, op0),
fold_convert (type, op1));
}
+ else
+ return chrec_dont_know;
}
}
}