#include "tree-cfgcleanup.h"
#include "builtins.h"
#include "tree-ssa-sccvn.h"
+#include "tree-vectorizer.h" /* For find_loop_location */
#include "dbgcnt.h"
/* Specifies types of loops that may be unrolled. */
tree niter;
HOST_WIDE_INT maxiter;
bool modified = false;
- dump_user_location_t locus;
class tree_niter_desc niter_desc;
bool may_be_zero = false;
may_be_zero
= niter_desc.may_be_zero && !integer_zerop (niter_desc.may_be_zero);
}
- if (TREE_CODE (niter) == INTEGER_CST)
- locus = last_nondebug_stmt (exit->src);
- else
+ if (TREE_CODE (niter) != INTEGER_CST)
{
/* For non-constant niter fold may_be_zero into niter again. */
if (may_be_zero)
|| TREE_CODE (niter) != INTEGER_CST))
niter = find_loop_niter_by_eval (loop, &exit);
- if (exit)
- locus = last_nondebug_stmt (exit->src);
-
if (TREE_CODE (niter) != INTEGER_CST)
exit = NULL;
}
populates the loop bounds. */
modified |= remove_redundant_iv_tests (loop);
+ dump_user_location_t locus = find_loop_location (loop);
if (try_unroll_loop_completely (loop, exit, niter, may_be_zero, ul,
maxiter, locus, allow_peel))
return true;