OSDN Git Service

2010-01-24 David S. Miller <davem@davemloft.net>
[pf3gnuchains/gcc-fork.git] / gcc / graphite.c
index 997e164..7037a3f 100644 (file)
@@ -54,15 +54,10 @@ along with GCC; see the file COPYING3.  If not see
 #include "pointer-set.h"
 #include "gimple.h"
 #include "sese.h"
+#include "predict.h"
 
 #ifdef HAVE_cloog
 
-/* The CLooG header file is not -Wc++-compat ready as of 2009-05-11.
-   This #pragma should be removed when it is ready.  */
-#if GCC_VERSION >= 4003
-#pragma GCC diagnostic warning "-Wc++-compat"
-#endif
-
 #include "cloog/cloog.h"
 #include "ppl_c.h"
 #include "graphite-ppl.h"
@@ -204,7 +199,10 @@ print_graphite_statistics (FILE* file, VEC (scop_p, heap) *scops)
 static bool
 graphite_initialize (void)
 {
-  if (number_of_loops () <= 1)
+  if (number_of_loops () <= 1
+      /* FIXME: This limit on the number of basic blocks of a function
+        should be removed when the SCOP detection is faster.  */
+      || n_basic_blocks > 100)
     {
       if (dump_file && (dump_flags & TDF_DETAILS))
        print_global_statistics (dump_file);
@@ -229,11 +227,16 @@ static void
 graphite_finalize (bool need_cfg_cleanup_p)
 {
   if (need_cfg_cleanup_p)
-    cleanup_tree_cfg ();
+    {
+      scev_reset ();
+      cleanup_tree_cfg ();
+      profile_status = PROFILE_ABSENT;
+      release_recorded_exits ();
+      tree_estimate_probability ();
+    }
 
   cloog_finalize ();
   free_original_copy_tables ();
-  free_aux_in_new_loops ();
 
   if (dump_file && dump_flags)
     print_loops (dump_file, 3);
@@ -277,15 +280,9 @@ graphite_transform_loops (void)
        check_poly_representation (scop);
 
       if (transform_done)
-       {
-         scev_reset ();
-         need_cfg_cleanup_p = true;
-       }
+       need_cfg_cleanup_p = true;
     }
 
-  if (flag_graphite_force_parallel)
-    mark_loops_parallel (bb_pbb_mapping);
-
   htab_delete (bb_pbb_mapping);
   free_scops (scops);
   graphite_finalize (need_cfg_cleanup_p);