rpms/gcc/devel .cvsignore, 1.180, 1.181 gcc41-pr29581.patch, 1.1, 1.2 gcc41.spec, 1.117, 1.118 sources, 1.182, 1.183 gcc41-configure-ld-ver.patch, 1.2, NONE gcc41-pr29641.patch, 1.3, NONE gcc41-pr29759.patch, 1.2, NONE
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Tue Nov 14 08:04:55 UTC 2006
Author: jakub
Update of /cvs/dist/rpms/gcc/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv3146
Modified Files:
.cvsignore gcc41-pr29581.patch gcc41.spec sources
Removed Files:
gcc41-configure-ld-ver.patch gcc41-pr29641.patch
gcc41-pr29759.patch
Log Message:
4.1.1-36
Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/.cvsignore,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -r1.180 -r1.181
--- .cvsignore 8 Nov 2006 17:38:23 -0000 1.180
+++ .cvsignore 14 Nov 2006 08:04:53 -0000 1.181
@@ -1 +1 @@
-gcc-4.1.1-20061108.tar.bz2
+gcc-4.1.1-20061114.tar.bz2
gcc41-pr29581.patch:
lambda-code.c | 106 ++++++++++++++++++++++++++++++++------
testsuite/gcc.dg/pr29581-1.c | 44 +++++++++++++++
testsuite/gcc.dg/pr29581-2.c | 46 ++++++++++++++++
testsuite/gcc.dg/pr29581-3.c | 48 +++++++++++++++++
testsuite/gcc.dg/pr29581-4.c | 48 +++++++++++++++++
testsuite/gfortran.dg/pr29581.f90 | 27 +++++++++
6 files changed, 305 insertions(+), 14 deletions(-)
Index: gcc41-pr29581.patch
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc41-pr29581.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gcc41-pr29581.patch 11 Nov 2006 09:01:59 -0000 1.1
+++ gcc41-pr29581.patch 14 Nov 2006 08:04:53 -0000 1.2
@@ -1,16 +1,30 @@
-2006-11-10 Jakub Jelinek <jakub at redhat.com>
+2006-11-13 Jakub Jelinek <jakub at redhat.com>
PR tree-optimization/29581
- * lambda-code.c (replace_uses_equiv_to_x_with_y): If USE has
- different type from Y or different initial condition, create
- a temporary var and initialize it at the beginning of the bodybb.
- (perfect_nestify): Adjust caller.
+ * lambda-code.c (replace_uses_equiv_to_x_with_y): Add YINIT,
+ REPLACEMENTS, FIRSTBSI arguments. If initial condition or
+ type is different between Y and USE, create a temporary
+ variable, initialize it at the beginning of the body bb
+ and use it as replacement instead of Y.
+ * gcc.dg/pr29581-1.c: New test.
+ * gcc.dg/pr29581-2.c: New test.
+ * gcc.dg/pr29581-3.c: New test.
+ * gcc.dg/pr29581-4.c: New test.
* gfortran.dg/pr29581.f90: New test.
---- gcc/lambda-code.c.jj 2006-10-05 11:51:35.000000000 +0200
-+++ gcc/lambda-code.c 2006-11-10 14:53:49.000000000 +0100
-@@ -2154,7 +2154,9 @@ perfect_nest_p (struct loop *loop)
+--- gcc/lambda-code.c.jj 2006-10-05 00:28:42.000000000 +0200
++++ gcc/lambda-code.c 2006-11-13 13:53:52.000000000 +0100
+@@ -2104,11 +2104,17 @@ perfect_nest_p (struct loop *loop)
+ return true;
+ }
+
+-/* Replace the USES of X in STMT, or uses with the same step as X with Y. */
++/* Replace the USES of X in STMT, or uses with the same step as X with Y.
++ YINIT is the initial value of Y, REPLACEMENTS is a hash table to
++ avoid creating duplicate temporaries and FIRSTBSI is statement
++ iterator where new temporaries should be inserted at the beginning
++ of body basic block. */
static void
replace_uses_equiv_to_x_with_y (struct loop *loop, tree stmt, tree x,
@@ -21,18 +35,19 @@
{
ssa_op_iter iter;
use_operand_p use_p;
-@@ -2163,17 +2165,71 @@ replace_uses_equiv_to_x_with_y (struct l
+@@ -2117,17 +2123,83 @@ replace_uses_equiv_to_x_with_y (struct l
{
tree use = USE_FROM_PTR (use_p);
tree step = NULL_TREE;
- tree scev = instantiate_parameters (loop,
- analyze_scalar_evolution (loop, use));
-+ tree scev, init, val, var;
++ tree scev, init, val, var, setstmt;
+ struct tree_map *h, in;
+ void **loc;
- if (scev != NULL_TREE && scev != chrec_dont_know)
- step = evolution_part_in_loop_num (scev, loop->num);
++ /* Replace uses of X with Y right away. */
+ if (use == x)
+ {
+ SET_USE (use_p, y);
@@ -52,6 +67,8 @@
+ || int_cst_value (step) != xstep)
+ continue;
+
++ /* Use REPLACEMENTS hash table to cache already created
++ temporaries. */
+ in.hash = htab_hash_pointer (use);
+ in.from = use;
+ h = htab_find_with_hash (replacements, &in, in.hash);
@@ -66,17 +83,21 @@
- && int_cst_value (step) == xstep)
- || USE_FROM_PTR (use_p) == x)
- SET_USE (use_p, y);
++ /* USE which has the same step as X should be replaced
++ with a temporary set to Y + YINIT - INIT. */
+ init = initial_condition_in_loop_num (scev, loop->num);
+ gcc_assert (init != NULL && init != chrec_dont_know);
+ if (TREE_TYPE (use) == TREE_TYPE (y))
+ {
-+ tree diff = fold_build2 (MINUS_EXPR, TREE_TYPE (y), init, yinit);
-+ if (integer_zerop (diff))
-+ {
++ val = fold_build2 (MINUS_EXPR, TREE_TYPE (y), init, yinit);
++ val = fold_build2 (PLUS_EXPR, TREE_TYPE (y), y, val);
++ if (val == y)
++ {
++ /* If X has the same type as USE, the same step
++ and same initial value, it can be replaced by Y. */
+ SET_USE (use_p, y);
+ continue;
+ }
-+ val = fold_build2 (PLUS_EXPR, TREE_TYPE (y), y, diff);
+ }
+ else
+ {
@@ -85,12 +106,17 @@
+ val = fold_build2 (PLUS_EXPR, TREE_TYPE (use), val, init);
+ }
+
++ /* Create a temporary variable and insert it at the beginning
++ of the loop body basic block, right after the PHI node
++ which sets Y. */
+ var = create_tmp_var (TREE_TYPE (use), "perfecttmp");
+ add_referenced_tmp_var (var);
+ val = force_gimple_operand_bsi (firstbsi, val, false, NULL);
-+ val = build (MODIFY_EXPR, TREE_TYPE (var), var, val);
-+ bsi_insert_before (firstbsi, val, BSI_SAME_STMT);
-+ update_stmt (val);
++ setstmt = build2 (MODIFY_EXPR, void_type_node, var, val);
++ var = make_ssa_name (var, setstmt);
++ TREE_OPERAND (setstmt, 0) = var;
++ bsi_insert_before (firstbsi, setstmt, BSI_SAME_STMT);
++ update_stmt (setstmt);
+ SET_USE (use_p, var);
+ h = ggc_alloc (sizeof (struct tree_map));
+ h->hash = in.hash;
@@ -102,7 +128,7 @@
}
}
-@@ -2433,7 +2489,7 @@ perfect_nestify (struct loops *loops,
+@@ -2379,7 +2451,7 @@ perfect_nestify (struct loops *loops,
tree then_label, else_label, cond_stmt;
basic_block preheaderbb, headerbb, bodybb, latchbb, olddest;
int i;
@@ -111,7 +137,7 @@
bool insert_after;
edge e;
struct loop *newloop;
-@@ -2442,7 +2498,8 @@ perfect_nestify (struct loops *loops,
+@@ -2388,7 +2460,8 @@ perfect_nestify (struct loops *loops,
tree stmt;
tree oldivvar, ivvar, ivvarinced;
VEC(tree,heap) *phis = NULL;
@@ -121,9 +147,9 @@
/* Create the new loop. */
olddest = loop->single_exit->dest;
preheaderbb = loop_split_edge_with (loop->single_exit, NULL);
-@@ -2538,10 +2595,13 @@ perfect_nestify (struct loops *loops,
- uboundvar,
- ivvarinced);
+@@ -2484,10 +2557,13 @@ perfect_nestify (struct loops *loops,
+ uboundvar,
+ ivvarinced);
update_stmt (exit_condition);
+ replacements = htab_create_ggc (20, tree_map_hash,
+ tree_map_eq, NULL);
@@ -135,7 +161,7 @@
for (i = loop->num_nodes - 1; i >= 0 ; i--)
{
block_stmt_iterator tobsi = bsi_last (bodybb);
-@@ -2597,7 +2657,8 @@ perfect_nestify (struct loops *loops,
+@@ -2543,7 +2619,8 @@ perfect_nestify (struct loops *loops,
}
replace_uses_equiv_to_x_with_y
@@ -145,7 +171,7 @@
bsi_move_before (&bsi, &tobsi);
-@@ -2613,6 +2674,7 @@ perfect_nestify (struct loops *loops,
+@@ -2559,6 +2636,7 @@ perfect_nestify (struct loops *loops,
}
free (bbs);
@@ -153,8 +179,206 @@
return perfect_nest_p (loop);
}
---- gcc/testsuite/gfortran.dg/pr29581.f90.jj 2006-11-10 14:58:49.000000000 +0100
-+++ gcc/testsuite/gfortran.dg/pr29581.f90 2006-11-10 14:59:33.000000000 +0100
+--- gcc/testsuite/gcc.dg/pr29581-1.c.jj 2006-11-13 13:51:38.000000000 +0100
++++ gcc/testsuite/gcc.dg/pr29581-1.c 2006-11-13 13:51:38.000000000 +0100
+@@ -0,0 +1,44 @@
++/* PR tree-optimization/29581 */
++/* Origin: gcc.dg/vect/vect-85.c */
++/* { dg-do run } */
++/* { dg-options "-O2 -ftree-loop-linear" } */
++
++extern void abort (void);
++
++#define N 16
++
++int main1 (int *a)
++{
++ int i, j, k;
++ int b[N];
++
++ for (i = 0; i < N; i++)
++ {
++ for (j = 0; j < N; j++)
++ {
++ k = i + N;
++ a[j] = k;
++ }
++ b[i] = k;
++ }
++
++
++ for (j = 0; j < N; j++)
++ if (a[j] != i + N - 1)
++ abort();
++
++ for (j = 0; j < N; j++)
++ if (b[j] != j + N)
++ abort();
++
++ return 0;
++}
++
++int main (void)
++{
++ int a[N] __attribute__ ((__aligned__(16)));
++
++ main1 (a);
++
++ return 0;
++}
+--- gcc/testsuite/gcc.dg/pr29581-2.c.jj 2006-11-13 13:51:38.000000000 +0100
++++ gcc/testsuite/gcc.dg/pr29581-2.c 2006-11-13 13:51:38.000000000 +0100
+@@ -0,0 +1,46 @@
++/* PR tree-optimization/29581 */
++/* Origin: gcc.dg/vect/vect-86.c */
++/* { dg-do run } */
++/* { dg-options "-O2 -ftree-loop-linear" } */
++
++extern void abort (void);
++
++#define N 16
++
++int main1 (int n)
++{
++ int i, j, k;
++ int a[N], b[N];
++
++ for (i = 0; i < n; i++)
++ {
++ for (j = 0; j < n; j++)
++ {
++ k = i + n;
++ a[j] = k;
++ }
++ b[i] = k;
++ }
++
++
++ for (j = 0; j < n; j++)
++ if (a[j] != i + n - 1)
++ abort();
++
++ for (i = 0; i < n; i++)
++ if (b[i] != i + n)
++ abort();
++
++ return 0;
++}
++
++int main (void)
++{
++ main1 (N);
++ main1 (0);
++ main1 (1);
++ main1 (2);
++ main1 (N-1);
++
++ return 0;
++}
+--- gcc/testsuite/gcc.dg/pr29581-3.c.jj 2006-11-13 13:51:38.000000000 +0100
++++ gcc/testsuite/gcc.dg/pr29581-3.c 2006-11-13 13:51:38.000000000 +0100
+@@ -0,0 +1,48 @@
++/* PR tree-optimization/29581 */
++/* Origin: gcc.dg/vect/vect-87.c */
++/* { dg-do run } */
++/* { dg-options "-O2 -ftree-loop-linear" } */
++
++extern void abort (void);
++
++#define N 16
++
++int main1 (int n, int *a)
++{
++ int i, j, k;
++ int b[N];
++
++ for (i = 0; i < n; i++)
++ {
++ for (j = 0; j < n; j++)
++ {
++ k = i + n;
++ a[j] = k;
++ }
++ b[i] = k;
++ }
++
++
++ for (j = 0; j < n; j++)
++ if (a[j] != i + n - 1)
++ abort();
++
++ for (j = 0; j < n; j++)
++ if (b[j] != j + n)
++ abort();
++
++ return 0;
++}
++
++int main (void)
++{
++ int a[N] __attribute__ ((__aligned__(16)));
++
++ main1 (N, a);
++ main1 (0, a);
++ main1 (1, a);
++ main1 (2, a);
++ main1 (N-1, a);
++
++ return 0;
++}
+--- gcc/testsuite/gcc.dg/pr29581-4.c.jj 2006-11-13 13:51:38.000000000 +0100
++++ gcc/testsuite/gcc.dg/pr29581-4.c 2006-11-13 13:51:38.000000000 +0100
+@@ -0,0 +1,48 @@
++/* PR tree-optimization/29581 */
++/* Origin: gcc.dg/vect/vect-88.c */
++/* { dg-do run } */
++/* { dg-options "-O2 -ftree-loop-linear" } */
++
++extern void abort (void);
++
++#define N 16
++
++int main1 (int n, int *a)
++{
++ int i, j, k;
++ int b[N];
++
++ for (i = 0; i < n; i++)
++ {
++ for (j = 0; j < n; j++)
++ {
++ k = i + n;
++ a[j] = k;
++ }
++ b[i] = k;
++ }
++
++
++ for (j = 0; j < n; j++)
++ if (a[j] != i + n - 1)
++ abort();
++
++ for (j = 0; j < n; j++)
++ if (b[j] != j + n)
++ abort();
++
++ return 0;
++}
++
++int main (void)
++{
++ int a[N+1] __attribute__ ((__aligned__(16)));
++
++ main1 (N, a+1);
++ main1 (0, a+1);
++ main1 (1, a+1);
++ main1 (2, a+1);
++ main1 (N-1, a+1);
++
++ return 0;
++}
+--- gcc/testsuite/gfortran.dg/pr29581.f90.jj 2006-11-13 13:51:26.000000000 +0100
++++ gcc/testsuite/gfortran.dg/pr29581.f90 2006-11-13 13:51:26.000000000 +0100
@@ -0,0 +1,27 @@
+! PR tree-optimization/29581
+! { dg-do run }
Index: gcc41.spec
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc41.spec,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -r1.117 -r1.118
--- gcc41.spec 11 Nov 2006 21:12:58 -0000 1.117
+++ gcc41.spec 14 Nov 2006 08:04:53 -0000 1.118
@@ -1,6 +1,6 @@
-%define DATE 20061108
+%define DATE 20061114
%define gcc_version 4.1.1
-%define gcc_release 35
+%define gcc_release 36
%define _unpackaged_files_terminate_build 0
%define multilib_64_archs sparc64 ppc64 s390x x86_64
%ifarch %{ix86} x86_64 ia64
@@ -125,21 +125,18 @@
Patch17: gcc41-pr29241.patch
Patch18: gcc41-i386-tune-geode.patch
Patch19: gcc41-hash-style-gnu.patch
-Patch20: gcc41-configure-ld-ver.patch
-Patch21: gcc41-pr29612.patch
-Patch22: gcc41-java-libdotdotlib.patch
-Patch23: gcc41-pr28709.patch
-Patch24: gcc41-pr28755.patch
-Patch25: gcc41-pr27898.patch
-Patch26: gcc41-pr27567.patch
-Patch27: gcc41-pr29272.patch
-Patch28: gcc41-pr29059.patch
-Patch29: gcc41-strncat-chk.patch
-Patch30: gcc41-pr29703.patch
-Patch31: gcc41-pr29299.patch
-Patch32: gcc41-pr29641.patch
-Patch33: gcc41-pr29581.patch
-Patch34: gcc41-pr29759.patch
+Patch20: gcc41-pr29612.patch
+Patch21: gcc41-java-libdotdotlib.patch
+Patch22: gcc41-pr28709.patch
+Patch23: gcc41-pr28755.patch
+Patch24: gcc41-pr27898.patch
+Patch25: gcc41-pr27567.patch
+Patch26: gcc41-pr29272.patch
+Patch27: gcc41-pr29059.patch
+Patch28: gcc41-strncat-chk.patch
+Patch29: gcc41-pr29703.patch
+Patch30: gcc41-pr29299.patch
+Patch31: gcc41-pr29581.patch
%define _gnu %{nil}
%ifarch sparc
@@ -442,21 +439,18 @@
%patch17 -p0 -b .pr29241~
%patch18 -p0 -b .i386-tune-geode~
%patch19 -p0 -b .hash-style-gnu~
-%patch20 -p0 -b .configure-ld-ver~
-%patch21 -p0 -b .pr29612~
-%patch22 -p0 -b .java-libdotdotlib~
-%patch23 -p0 -b .pr28709~
-%patch24 -p0 -b .pr28755~
-%patch25 -p0 -b .pr27898~
-%patch26 -p0 -b .pr27567~
-%patch27 -p0 -b .pr29272~
-%patch28 -p0 -b .pr29059~
-%patch29 -p0 -b .strncat-chk~
-%patch30 -p0 -b .pr29703~
-%patch31 -p0 -b .pr29299~
-%patch32 -p0 -b .pr29641~
-#%patch33 -p0 -b .pr29581~
-%patch34 -p0 -b .pr29759~
+%patch20 -p0 -b .pr29612~
+%patch21 -p0 -b .java-libdotdotlib~
+%patch22 -p0 -b .pr28709~
+%patch23 -p0 -b .pr28755~
+%patch24 -p0 -b .pr27898~
+%patch25 -p0 -b .pr27567~
+%patch26 -p0 -b .pr29272~
+%patch27 -p0 -b .pr29059~
+%patch28 -p0 -b .strncat-chk~
+%patch29 -p0 -b .pr29703~
+%patch30 -p0 -b .pr29299~
+%patch31 -p0 -b .pr29581~
sed -i -e 's/4\.1\.2/4.1.1/' gcc/BASE-VER gcc/version.c
sed -i -e 's/" (Red Hat[^)]*)"/" (Red Hat %{version}-%{gcc_release})"/' gcc/version.c
@@ -1516,6 +1510,16 @@
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
%changelog
+* Tue Nov 14 2006 Jakub Jelinek <jakub at redhat.com> 4.1.1-36
+- update from gcc-4_1-branch (-r118571:118805)
+ - PRs c++/29106, c++/29518, fortran/24518, fortran/29216, fortran/29314,
+ fortran/29371, fortran/29387, fortran/29392, fortran/29490,
+ fortran/29565, fortran/29630, fortran/29679, fortran/29713,
+ middle-end/21032, middle-end/28915, testsuite/28703, tree-opt/28545
+- honor initial conditions and variable types in conversion to perfect
+ nesting for -ftree-loop-linear optimizations (#209297,
+ PR tree-optimization/29581)
+
* Sat Nov 11 2006 Jakub Jelinek <jakub at redhat.com> 4.1.1-35
- fix libgcj_bc.so dummy lib on i?86/x86_64/ia64/s390/s390x
Index: sources
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/sources,v
retrieving revision 1.182
retrieving revision 1.183
diff -u -r1.182 -r1.183
--- sources 8 Nov 2006 17:38:23 -0000 1.182
+++ sources 14 Nov 2006 08:04:53 -0000 1.183
@@ -1 +1 @@
-a99ef8c21c086ebb8e15fffa6397c9a4 gcc-4.1.1-20061108.tar.bz2
+4968d24038d95dbfa273b4d8db9fa777 gcc-4.1.1-20061114.tar.bz2
--- gcc41-configure-ld-ver.patch DELETED ---
--- gcc41-pr29641.patch DELETED ---
--- gcc41-pr29759.patch DELETED ---
More information about the fedora-cvs-commits
mailing list