re PR tree-optimization/20216 (Simple loop runs out of stack at -O1)
authorRoger Sayle <roger@eyesopen.com>
Tue, 1 Mar 2005 02:43:49 +0000 (02:43 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Tue, 1 Mar 2005 02:43:49 +0000 (02:43 +0000)
commit1a9dddada346b812bafc8918d082c993c7f0a82d
tree64d2edac2cf6316d5116125278fb576fd0d0116e
parent6a88516c9d9bfd528fdfa2ac2904fc0c14597b9c
re PR tree-optimization/20216 (Simple loop runs out of stack at -O1)

PR tree-optimization/20216
* tree-chrec.c (tree_fold_factorial): Delete.
(tree_fold_binomial): Change argument list to take a return type
and change the type of K to unsigned int.  Rewrite to avoid explicit
evaluation of factorials, and (recursively) calling fold to perform
compile-time arithmetic.  Return NULL on (internal) overflow.
(chrec_evaluate): Change type of K to an unsigned int.  Avoid
calling tree_fold_binomial unnecessarily.  Return chrec_dont_know
if any intermediate calculation overflows.
(chrec_apply): Update call to chrec_evaluate.

From-SVN: r95722
gcc/ChangeLog
gcc/tree-chrec.c