OSDN Git Service

2009-01-05 Harsha Jagasia <harsha.jagasia@amd.com>
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Jan 2009 21:03:45 +0000 (21:03 +0000)
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Jan 2009 21:03:45 +0000 (21:03 +0000)
PR tree-optimization/38510
* graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
(translate_clast): Call recompute_all_dominators before
graphite_verify.
(gloog): Call recompute_all_dominators before graphite_verify.

2009-01-05  Harsha Jagasia  <harsha.jagasia@amd.com>
    Jan Sjodin <jan.sjodin@amd.com>

PR tree-optimization/38500
* graphite.c (create_sese_edges): Call fix_loop_structure after
splitting blocks.

2009-01-05  Harsha Jagasia  <harsha.jagasia@amd.com>

PR tree-optimization/38510
* gcc.dg/graphite/pr38510.c: New.

2009-01-05  Harsha Jagasia  <harsha.jagasia@amd.com>
    Jan Sjodin <jan.sjodin@amd.com>

PR tree-optimization/38500
* gcc.dg/graphite/pr38500.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143094 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/graphite.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/graphite/pr38500.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/pr38510.c [new file with mode: 0644]

index 3475f45..d7efd58 100644 (file)
@@ -1,3 +1,18 @@
+2009-01-05  Harsha Jagasia  <harsha.jagasia@amd.com>
+
+       PR tree-optimization/38510
+       * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
+       (translate_clast): Call recompute_all_dominators before
+       graphite_verify.
+       (gloog): Call recompute_all_dominators before graphite_verify.
+
+2009-01-05  Harsha Jagasia  <harsha.jagasia@amd.com>
+           Jan Sjodin <jan.sjodin@amd.com>
+
+       PR tree-optimization/38500
+       * graphite.c (create_sese_edges): Call fix_loop_structure after
+       splitting blocks.
+
 2009-01-05  Joel Sherrill <joel.sherrill@oarcorp.com>
 
        * config.gcc: Add m32r*-*-rtems*.
index eda09f8..b051b5b 100644 (file)
@@ -1951,6 +1951,7 @@ mark_exit_edges (VEC (sd_region, heap) *regions)
 static inline void
 recompute_all_dominators (void)
 {
+  mark_irreducible_loops ();
   free_dominance_info (CDI_DOMINATORS);
   free_dominance_info (CDI_POST_DOMINATORS);
   calculate_dominance_info (CDI_DOMINATORS);
@@ -1988,6 +1989,8 @@ create_sese_edges (VEC (sd_region, heap) *regions)
 
   unmark_exit_edges (regions);
 
+  fix_loop_structure (NULL);
+
 #ifdef ENABLE_CHECKING
   verify_loop_structure ();
   verify_dominators (CDI_DOMINATORS);
@@ -4283,6 +4286,7 @@ translate_clast (scop_p scop, struct loop *context_loop,
       next_e = translate_clast (scop, context_loop, 
                                ((struct clast_guard *) stmt)->then,
                                true_e, ivstack);
+      recompute_all_dominators ();
       graphite_verify ();
       return translate_clast (scop, context_loop, stmt->next, last_e, ivstack);
     }
@@ -4292,6 +4296,7 @@ translate_clast (scop_p scop, struct loop *context_loop,
       next_e = translate_clast (scop, context_loop,
                                ((struct clast_block *) stmt)->body,
                                next_e, ivstack);
+      recompute_all_dominators ();
       graphite_verify ();
       return translate_clast (scop, context_loop, stmt->next, next_e, ivstack);
     }
@@ -4975,12 +4980,14 @@ gloog (scop_p scop, struct clast_stmt *stmt)
                                if_region->region->exit->src,
                                if_region->false_region->exit,
                                if_region->true_region->exit);
+  recompute_all_dominators ();
   graphite_verify ();
   context_loop = SESE_ENTRY (SCOP_REGION (scop))->src->loop_father;
   compute_cloog_iv_types (stmt);
   new_scop_exit_edge = translate_clast (scop, context_loop,
                                        stmt, if_region->true_region->entry,
                                        &ivstack);
+  recompute_all_dominators ();
   graphite_verify ();
   cleanup_tree_cfg ();
   recompute_all_dominators ();
index c41cf5b..6a6bc13 100644 (file)
@@ -1,3 +1,14 @@
+2009-01-05  Harsha Jagasia  <harsha.jagasia@amd.com>
+
+       PR tree-optimization/38510
+       * gcc.dg/graphite/pr38510.c: New.
+
+2009-01-05  Harsha Jagasia  <harsha.jagasia@amd.com>
+           Jan Sjodin <jan.sjodin@amd.com>
+
+       PR tree-optimization/38500
+       * gcc.dg/graphite/pr38500.c: New.
+
 2009-01-05  Laurent GUERBY  <laurent@guerby.net>
 
        * gcc.c-torture/compile/20001226-1.c: Generalize 
diff --git a/gcc/testsuite/gcc.dg/graphite/pr38500.c b/gcc/testsuite/gcc.dg/graphite/pr38500.c
new file mode 100644 (file)
index 0000000..f5292d1
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options "-O3 -fgraphite-identity" } */
+
+typedef unsigned char U8;
+extern char test1;
+
+char *Perl_screaminstr (int, int, int);
+
+void
+Perl_re_intuit_start( int minlen,  char *strend, unsigned int flags, int i)
+{
+  register int start_shift = 0;
+  register int end_shift = 0;
+  register char *s;
+  char *strbeg;
+  char *t;
+  if(i > 0)
+    goto success_at_start;
+  int end = 0;
+  int eshift = (test1 ? Perl_utf8_distance((U8*)strend,(U8*)s) : (U8*)strend - (U8*)s) - end;
+  if (end_shift < eshift)
+    end_shift = eshift;
+ restart:
+  s = Perl_screaminstr(start_shift + (s - strbeg), end_shift, 0);
+  while( t < strend - minlen){  
+  }
+ success_at_start:
+  eshift = (test1 ? Perl_utf8_distance((U8*)strend,(U8*)s) : (U8*)strend - (U8*)s) - end;
+  goto restart;
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr38510.c b/gcc/testsuite/gcc.dg/graphite/pr38510.c
new file mode 100644 (file)
index 0000000..07ddb6e
--- /dev/null
@@ -0,0 +1,40 @@
+/* { dg-options "-O2 -fgraphite-identity" } */
+typedef long int integer;
+typedef double doublereal;
+
+static int balanc_(nm, n, a, low, igh, scale)
+doublereal *a;
+{
+ integer a_dim1, a_offset, i__1, i__2;
+ integer iexc;
+ integer i__, j, k, l, m;
+ integer jj;
+goto L100;
+L20:
+if (j == m) {
+goto L50;
+}
+for (i__ = 1; i__ <= i__1; ++i__) {
+a[i__ + j * a_dim1] = a[i__ + m * a_dim1];
+}
+L50:
+switch ((int)iexc) {
+case 2: goto L130;
+}
+L100:
+for (jj = 1; jj <= i__1; ++jj) {
+goto L20;
+}
+L130:
+for (j = k; j <= i__1; ++j) {
+goto L20;
+}
+}
+
+int pymol_rg_(integer *nm, integer *n, doublereal *a, doublereal *wr,
+              doublereal *fv1,integer *ierr)
+{
+    integer a_dim1, a_offset, z_dim1, z_offset;
+    integer is1, is2;
+    balanc_(nm, n, &a[a_offset], &is1, &is2, &fv1[1]);
+}