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. */
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "errors.h"
#include "ggc.h"
#include "tree.h"
#include "target.h"
unsigned int *nb_deps_not_carried_by_loop,
unsigned int *access_strides)
{
- unsigned int i;
+ unsigned int i, j;
*dependence_steps = 0;
*nb_deps_not_carried_by_loop = 0;
for (i = 0; i < VARRAY_ACTIVE_SIZE (dependence_relations); i++)
{
- int dist;
struct data_dependence_relation *ddr =
(struct data_dependence_relation *)
VARRAY_GENERIC_PTR (dependence_relations, i);
/* If we don't know anything about this dependence, or the distance
vector is NULL, or there is no dependence, then there is no reuse of
data. */
-
- if (DDR_DIST_VECT (ddr) == NULL
- || DDR_ARE_DEPENDENT (ddr) == chrec_dont_know
- || DDR_ARE_DEPENDENT (ddr) == chrec_known)
+ if (DDR_ARE_DEPENDENT (ddr) == chrec_dont_know
+ || DDR_ARE_DEPENDENT (ddr) == chrec_known
+ || DDR_NUM_DIST_VECTS (ddr) == 0)
continue;
-
-
- dist = DDR_DIST_VECT (ddr)[loop->depth - first_loop->depth];
- if (dist == 0)
- (*nb_deps_not_carried_by_loop) += 1;
- else if (dist < 0)
- (*dependence_steps) += -dist;
- else
- (*dependence_steps) += dist;
+ for (j = 0; j < DDR_NUM_DIST_VECTS (ddr); j++)
+ {
+ int dist = DDR_DIST_VECT (ddr, j)[loop->depth - first_loop->depth];
+
+ if (dist == 0)
+ (*nb_deps_not_carried_by_loop) += 1;
+
+ else if (dist < 0)
+ (*dependence_steps) += -dist;
+
+ else
+ (*dependence_steps) += dist;
+ }
}
/* Compute the access strides. */
linear_transform_loops (struct loops *loops)
{
unsigned int i;
- VEC(tree,gc) *oldivs = NULL; /* FIXME:These should really be on the
- heap. (nathan 2005/04/15)*/
- VEC(tree,gc) *invariants = NULL; /* FIXME:Likewise. */
+ VEC(tree,heap) *oldivs = NULL;
+ VEC(tree,heap) *invariants = NULL;
for (i = 1; i < loops->num; i++)
{
"dependence_relations");
- compute_data_dependences_for_loop (depth, loop_nest,
+ compute_data_dependences_for_loop (loop_nest, true,
&datarefs, &dependence_relations);
if (dump_file && (dump_flags & TDF_DETAILS))
{
VARRAY_GENERIC_PTR (dependence_relations, j);
if (DDR_ARE_DEPENDENT (ddr) == NULL_TREE)
- {
- fprintf (dump_file, "DISTANCE_V (");
- print_lambda_vector (dump_file, DDR_DIST_VECT (ddr),
- DDR_SIZE_VECT (ddr));
- fprintf (dump_file, ")\n");
- fprintf (dump_file, "DIRECTION_V (");
- print_lambda_vector (dump_file, DDR_DIR_VECT (ddr),
- DDR_SIZE_VECT (ddr));
- fprintf (dump_file, ")\n");
- }
+ dump_data_dependence_relation (dump_file, ddr);
}
fprintf (dump_file, "\n\n");
}
free_dependence_relations (dependence_relations);
free_data_refs (datarefs);
}
- VEC_free (tree, gc, oldivs);
- VEC_free (tree, gc, invariants);
+ VEC_free (tree, heap, oldivs);
+ VEC_free (tree, heap, invariants);
scev_reset ();
- update_ssa (TODO_update_ssa);
- rewrite_into_loop_closed_ssa (NULL);
+ rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa_full_phi);
}