diff mbox

[fortran] PR 45159, dependency checking

Message ID 1280776665.8778.7.camel@linux-fd1f.site
State New
Headers show

Commit Message

Thomas Koenig Aug. 2, 2010, 7:17 p.m. UTC
Hello world,

this rather simple patch fixes one test case from PR 45159 (many more to
go).  This one is rather important because this is a real-world hot
loop.  Regression-tested.  OK for trunk?

(BTW, did the loop reversal stuff get committed to 4.5 as well?  If this
is the case, I would also want to fix this there).

	Thomas

2010-08-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/45159
	* depencency.c (gfc_dep_resolver):  Fix logic for when a loop
	can be reversed.

2010-08-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/45159

	* gfortran.dg/dependency_29.f90:  New test.

Comments

Tobias Burnus Aug. 2, 2010, 9:49 p.m. UTC | #1
Thomas Koenig wrote:
> this rather simple patch fixes one test case from PR 45159 (many more to
> go).  This one is rather important because this is a real-world hot
> loop.  Regression-tested.  OK for trunk?
>   

OK. Thanks for your optimization work!

> (BTW, did the loop reversal stuff get committed to 4.5 as well?  If this
> is the case, I would also want to fix this there).
>   

If I recall correctly, Paul planned to do so, but didn't.

Tobias

> 2010-08-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
>
> 	PR fortran/45159
> 	* depencency.c (gfc_dep_resolver):  Fix logic for when a loop
> 	can be reversed.
>
> 2010-08-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
>
> 	PR fortran/45159
>
> 	* gfortran.dg/dependency_29.f90:  New test.
>
Thomas Koenig Aug. 2, 2010, 10:07 p.m. UTC | #2
Tobias Burnus wrote:

> Thomas Koenig wrote:
> > this rather simple patch fixes one test case from PR 45159 (many
> more to
> > go).  This one is rather important because this is a real-world hot
> > loop.  Regression-tested.  OK for trunk?
> >   
> 
> OK. Thanks for your optimization work!

Thanks!

You know, I had to find something else now that that there aren't many
library bugs any more ;-)

	Thomas

Sende          fortran/ChangeLog
Sende          fortran/dependency.c
Sende          testsuite/ChangeLog
Hinzufügen     testsuite/gfortran.dg/dependency_29.f90
Übertrage Daten ....
Revision 162829 übertragen.
Paul Richard Thomas Aug. 9, 2010, 10:22 a.m. UTC | #3
Dear All,

>> (BTW, did the loop reversal stuff get committed to 4.5 as well?  If this
>> is the case, I would also want to fix this there).
>>

No, it did not because....

>
> If I recall correctly, Paul planned to do so, but didn't.
>

when I left for vacation 4.5 was closed.  Now I am back, I will deal
with it sometime this week.

Cheers

Paul
diff mbox

Patch

Index: dependency.c
===================================================================
--- dependency.c	(Revision 162824)
+++ dependency.c	(Arbeitskopie)
@@ -1716,8 +1716,8 @@  gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gf
 
 		  /* If no intention of reversing or reversing is explicitly
 		     inhibited, convert backward dependence to overlap.  */
-		  if ((reverse == NULL && this_dep == GFC_DEP_BACKWARD)
-			|| (reverse && reverse[n] == GFC_CANNOT_REVERSE))
+		  if (this_dep == GFC_DEP_BACKWARD
+		      && (reverse == NULL || reverse[n] == GFC_CANNOT_REVERSE))
 		    this_dep = GFC_DEP_OVERLAP;
 		}