#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "tree.h"
+#include "expr.h"
#include "gimple-pretty-print.h"
-#include "tree-flow.h"
+#include "gimple.h"
+#include "gimple-iterator.h"
+#include "tree-ssa-loop-niter.h"
+#include "tree-ssa-loop.h"
+#include "tree-ssa.h"
#include "cfgloop.h"
#include "tree-data-ref.h"
#include "tree-scalar-evolution.h"
{
if (!integer_zerop (TREE_OPERAND (base, 1)))
{
- double_int moff = mem_ref_offset (base);
- tree mofft = double_int_to_tree (sizetype, moff);
+ offset_int moff = mem_ref_offset (base);
+ tree mofft = wide_int_to_tree (sizetype, moff);
if (!poffset)
poffset = mofft;
else
affine_fn comm;
if (!CF_NONTRIVIAL_P (cf))
- return affine_fn();
+ return affine_fn ();
comm = cf->fns[0];
for (i = 1; i < cf->n; i++)
if (!affine_function_equal_p (comm, cf->fns[i]))
- return affine_fn();
+ return affine_fn ();
return comm;
}
if (!loop_nest)
{
aff_tree off1, off2;
- double_int size1, size2;
+ widest_int size1, size2;
get_inner_reference_aff (DR_REF (a), &off1, &size1);
get_inner_reference_aff (DR_REF (b), &off2, &size2);
- aff_combination_scale (&off1, double_int_minus_one);
+ aff_combination_scale (&off1, -1);
aff_combination_add (&off2, &off1);
if (aff_comb_cannot_overlap_p (&off2, size1, size2))
return false;
va_list ap;
gcc_assert (0 < n && n <= MAX_DIM);
- va_start(ap, n);
+ va_start (ap, n);
ret->n = n;
for (i = 0; i < n; i++)
ret->fns[i] = va_arg (ap, affine_fn);
- va_end(ap);
+ va_end (ap);
return ret;
}
static tree
max_stmt_executions_tree (struct loop *loop)
{
- double_int nit;
+ widest_int nit;
if (!max_stmt_executions (loop, &nit))
return chrec_dont_know;
- if (!double_int_fits_to_tree_p (unsigned_type_node, nit))
+ if (!wi::fits_to_tree_p (nit, unsigned_type_node))
return chrec_dont_know;
- return double_int_to_tree (unsigned_type_node, nit);
+ return wide_int_to_tree (unsigned_type_node, nit);
}
/* Determine whether the CHREC is always positive/negative. If the expression
HOST_WIDE_INT cd = 0, val;
tree step;
- if (!host_integerp (cst, 0))
+ if (!tree_fits_shwi_p (cst))
return true;
- val = tree_low_cst (cst, 0);
+ val = tree_to_shwi (cst);
while (TREE_CODE (chrec) == POLYNOMIAL_CHREC)
{
step = CHREC_RIGHT (chrec);
- if (!host_integerp (step, 0))
+ if (!tree_fits_shwi_p (step))
return true;
- cd = gcd (cd, tree_low_cst (step, 0));
+ cd = gcd (cd, tree_to_shwi (step));
chrec = CHREC_LEFT (chrec);
}
true if STMT clobbers memory, false otherwise. */
static bool
-get_references_in_stmt (gimple stmt, vec<data_ref_loc, va_stack> *references)
+get_references_in_stmt (gimple stmt, vec<data_ref_loc, va_heap> *references)
{
bool clobbers_memory = false;
data_ref_loc ref;
vec<data_reference_p> *datarefs)
{
unsigned i;
- vec<data_ref_loc, va_stack> references;
+ stack_vec<data_ref_loc, 2> references;
data_ref_loc *ref;
bool ret = true;
data_reference_p dr;
- vec_stack_alloc (data_ref_loc, references, 2);
if (get_references_in_stmt (stmt, &references))
- {
- references.release ();
- return false;
- }
+ return false;
FOR_EACH_VEC_ELT (references, i, ref)
{
vec<data_reference_p> *datarefs)
{
unsigned i;
- vec<data_ref_loc, va_stack> references;
+ stack_vec<data_ref_loc, 2> references;
data_ref_loc *ref;
bool ret = true;
data_reference_p dr;
- vec_stack_alloc (data_ref_loc, references, 2);
if (get_references_in_stmt (stmt, &references))
- {
- references.release ();
- return false;
- }
+ return false;
FOR_EACH_VEC_ELT (references, i, ref)
{
void
tree_check_data_deps (void)
{
- loop_iterator li;
struct loop *loop_nest;
- FOR_EACH_LOOP (li, loop_nest, 0)
+ FOR_EACH_LOOP (loop_nest, 0)
analyze_all_data_dependences (loop_nest);
}