This code has no license restrictions, and is considered public
domain.
- Changes copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+ Changes copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+ Inc.
Contributed by Sebastian Pop <sebastian.pop@inria.fr>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
+Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
for more details.
You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
/* For a detailed description, see "Constraint-Based Array Dependence
Analysis" William Pugh, David Wonnacott, TOPLAS'98 and David
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "errors.h"
#include "ggc.h"
#include "tree.h"
#include "diagnostic.h"
enum omega_result result;
int e;
bool any_color = false;
- omega_pb tmp_problem = XNEW (struct omega_pb);
+ omega_pb tmp_problem = XNEW (struct omega_pb_d);
omega_copy_problem (tmp_problem, pb);
tmp_problem->safe_vars = 0;
if (!expensive)
goto eliminate_redundant_done;
- tmp_problem = XNEW (struct omega_pb);
+ tmp_problem = XNEW (struct omega_pb_d);
conservative++;
for (e = pb->num_geqs - 1; e >= 0; e--)
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file,
- "Smoothing wierd equations; adding:\n");
+ "Smoothing weird equations; adding:\n");
omega_print_geq (dump_file, pb, &pb->geqs[e3]);
fprintf (dump_file, "\nto:\n");
omega_print_problem (dump_file, pb);
return;
conservative++;
- tmp_problem = XNEW (struct omega_pb);
+ tmp_problem = XNEW (struct omega_pb_d);
for (e = pb->num_geqs - 1; e >= 0; e--)
if (pb->geqs[e].color == omega_red)
eqn->coef[j] *= a;
k = eqn->coef[i];
eqn->coef[i] = 0;
- eqn->color |= sub->color;
+ if (sub->color == omega_red)
+ eqn->color = omega_red;
for (j = n_vars; j >= 0; j--)
eqn->coef[j] -= sub->coef[j] * k / c;
}
omega_print_problem (dump_file, pb);
}
- tmp_problem = XNEW (struct omega_pb);
+ tmp_problem = XNEW (struct omega_pb_d);
omega_copy_eqn (&pb->eqs[0], &pb->geqs[e], pb->num_vars);
pb->num_eqs = 1;
omega_initialize ();
/* Allocate and initialize PB. */
- pb = XCNEW (struct omega_pb);
+ pb = XCNEW (struct omega_pb_d);
pb->var = XCNEWVEC (int, OMEGA_MAX_VARS + 2);
pb->forwarding_address = XCNEWVEC (int, OMEGA_MAX_VARS + 2);
pb->geqs = omega_alloc_eqns (0, OMEGA_MAX_GEQS);