@@ -1991,6 +1991,7 @@ build_scop_drs (scop_p scop)
if (VEC_empty (data_reference_p, GBB_DATA_REFS (PBB_BLACK_BOX (pbb))))
{
free_gimple_bb (PBB_BLACK_BOX (pbb));
+ free_poly_bb (pbb);
VEC_ordered_remove (poly_bb_p, SCOP_BBS (scop), i);
i--;
}
commit aeeb472ced57e8142ccaabd39e104a90576f8b8c
Author: Tobias Grosser <tobias@grosser.es>
Date: Fri Jan 13 22:15:39 2012 +0100
Do not run graphite on already parallel functions
@@ -253,6 +254,11 @@ graphite_transform_loops (void)
VEC (scop_p, heap) *scops = NULL;
htab_t bb_pbb_mapping;
+ /* If a function is parallel it was most probably already run through graphite
+ once. No need to run again. */
+ if (parallelized_function_p (cfun->decl))
+ return;
+
if (!graphite_initialize ())
return;
@@ -858,6 +858,9 @@ void warn_function_noreturn (tree);
/* In tree-ssa-ter.c */
bool stmt_is_replaceable_p (gimple);
+/* In tree-parloops.c */
+bool parallelized_function_p (tree);
+
#include "tree-flow-inline.h"
void swap_tree_operands (gimple, tree *, tree *);
@@ -1394,7 +1394,7 @@ static GTY(()) bitmap parallelized_functions;
/* Returns true if FN was created by create_loop_fn. */
-static bool
+bool
parallelized_function_p (tree fn)
{
if (!parallelized_functions || !DECL_ARTIFICIAL (fn))
@@ -24,7 +24,7 @@ int main(void)
}
/* Check that parallel code generation part make the right answer. */
-/* { dg-final { scan-tree-dump-times "1 loops carried no dependency" 2 "graphite" } } */
+/* { dg-final { scan-tree-dump-times "1 loops carried no dependency" 1 "graphite" } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
/* { dg-final { scan-tree-dump-times "loopfn" 5 "optimized" } } */
/* { dg-final { cleanup-tree-dump "parloops" } } */
@@ -23,7 +23,7 @@ int main(void)
}
/* Check that parallel code generation part make the right answer. */
-/* { dg-final { scan-tree-dump-times "2 loops carried no dependency" 2 "graphite" } } */
+/* { dg-final { scan-tree-dump-times "2 loops carried no dependency" 1 "graphite" } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
/* { dg-final { scan-tree-dump-times "loopfn" 5 "optimized" } } */
/* { dg-final { cleanup-tree-dump "parloops" } } */