summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-niter.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-20 13:32:32 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-20 13:32:32 +0000
commitfe5ad9266cba2cbb611a831aaac450d3f6decd0c (patch)
treea1dce161550e71aa81d0af00e118e4f68d907995 /gcc/tree-ssa-loop-niter.c
parent6715fbd40b05c43941c4d4e093cceb5345a695e7 (diff)
parent8c53c46cebf42cb4f4ac125ca6428c5e9b519f66 (diff)
downloadgcc-fe5ad9266cba2cbb611a831aaac450d3f6decd0c.tar.gz
Merge from trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@205111 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
-rw-r--r--gcc/tree-ssa-loop-niter.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index c4f4aef0bc4..5c187f5d154 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -22,6 +22,8 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
+#include "calls.h"
+#include "expr.h"
#include "tm_p.h"
#include "basic-block.h"
#include "gimple-pretty-print.h"
@@ -47,6 +49,7 @@ along with GCC; see the file COPYING3. If not see
#include "diagnostic-core.h"
#include "tree-inline.h"
#include "tree-pass.h"
+#include "stringpool.h"
#include "tree-ssanames.h"
#include "wide-int-print.h"
@@ -490,7 +493,7 @@ bound_difference (struct loop *loop, tree x, tree y, bounds *bnds)
/* Now walk the dominators of the loop header and use the entry
guards to refine the estimates. */
for (bb = loop->header;
- bb != ENTRY_BLOCK_PTR && cnt < MAX_DOMINATORS_TO_WALK;
+ bb != ENTRY_BLOCK_PTR_FOR_FN (cfun) && cnt < MAX_DOMINATORS_TO_WALK;
bb = get_immediate_dominator (CDI_DOMINATORS, bb))
{
if (!single_pred_p (bb))
@@ -1774,7 +1777,7 @@ simplify_using_initial_conditions (struct loop *loop, tree expr)
the number of BBs times the number of loops in degenerate
cases. */
for (bb = loop->header;
- bb != ENTRY_BLOCK_PTR && cnt < MAX_DOMINATORS_TO_WALK;
+ bb != ENTRY_BLOCK_PTR_FOR_FN (cfun) && cnt < MAX_DOMINATORS_TO_WALK;
bb = get_immediate_dominator (CDI_DOMINATORS, bb))
{
if (!single_pred_p (bb))
@@ -3570,14 +3573,13 @@ estimated_stmt_executions (struct loop *loop, widest_int *nit)
void
estimate_numbers_of_iterations (void)
{
- loop_iterator li;
struct loop *loop;
/* We don't want to issue signed overflow warnings while getting
loop iteration estimates. */
fold_defer_overflow_warnings ();
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
estimate_numbers_of_iterations_loop (loop);
}
@@ -3847,10 +3849,9 @@ free_numbers_of_iterations_estimates_loop (struct loop *loop)
void
free_numbers_of_iterations_estimates (void)
{
- loop_iterator li;
struct loop *loop;
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
free_numbers_of_iterations_estimates_loop (loop);
}