[Bug fortran/45648] [4.6 regression] Unnecessary temporary for transpose calls as actual argument.

2010-09-23 Thread mikael at gcc dot gnu dot org


--- Comment #8 from mikael at gcc dot gnu dot org  2010-09-23 11:11 ---
Subject: Bug 45648

Author: mikael
Date: Thu Sep 23 11:11:23 2010
New Revision: 164558

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=164558
Log:
2010-09-23  Mikael Morin  mik...@gcc.gnu.org

PR fortran/45745
PR fortran/45648
* trans-array.c (gfc_conv_expr_descriptor): Handle 
ss-type == GFC_SS_INTRINSIC (for {l,u}bound intrinsics) case. 

2010-09-23  Mikael Morin  mik...@gcc.gnu.org

PR fortran/45745
PR fortran/45648
* gfortran.dg/vector_subscript_bound_1.f90: New.


Added:
trunk/gcc/testsuite/gfortran.dg/vector_subscript_bound_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45648



[Bug fortran/45648] [4.6 regression] Unnecessary temporary for transpose calls as actual argument.

2010-09-23 Thread mikael at gcc dot gnu dot org


--- Comment #9 from mikael at gcc dot gnu dot org  2010-09-23 14:13 ---
Unless something breaks again, this should be fixed now. 


-- 

mikael at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45648



[Bug fortran/45648] [4.6 regression] Unnecessary temporary for transpose calls as actual argument.

2010-09-21 Thread mikael at gcc dot gnu dot org


--- Comment #7 from mikael at gcc dot gnu dot org  2010-09-21 19:04 ---
Subject: Bug 45648

Author: mikael
Date: Tue Sep 21 19:04:09 2010
New Revision: 164494

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=164494
Log:
2010-09-21  Mikael Morin  mik...@gcc.gnu.org

PR fortran/45648
* trans-array.c (gfc_conv_expr_descriptor): Calculate dim out of n and
info-dim.

PR fortran/45648
* trans-array.c (gfc_conv_expr_descriptor): Unset full if we are
accessing dimensions in reversed order. 

PR fortran/45648
* trans-array.c (gfc_conv_expr_descriptor): Special case noncopying
intrinsic function call. 

* trans-array.c (gfc_conv_expr_descriptor): Remove ss lookup.
Update asserts accordingly.

PR fortran/45648
* trans.h (gfc_se): New field force_tmp. 
* trans-expr.c (gfc_conv_procedure_call): Check for argument alias
and set parmse.force_tmp if some alias is found. 
* trans-array.c (gfc_conv_expr_descriptor): Force a temporary creation
if se-force_tmp is set. 

2010-09-21  Mikael Morin  mik...@gcc.gnu.org

PR fortran/45648
* gfortran.dg/inline_transpose_1.f90: Update temporary's locations
and counts. Add non-elemental function call check.

PR fortran/45648
* gfortran.dg/inline_transpose_1.f90: Add function calls with aliasing
arguments checks. Update temporary counts.
* gfortran.dg/transpose_optimization_1.f90: New.


Added:
trunk/gcc/testsuite/gfortran.dg/transpose_optimization_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/inline_transpose_1.f90


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45648



[Bug fortran/45648] [4.6 regression] Unnecessary temporary for transpose calls as actual argument.

2010-09-20 Thread pthaugen at gcc dot gnu dot org


--- Comment #3 from pthaugen at gcc dot gnu dot org  2010-09-20 20:00 
---
As Steven mentioned in the mailing list, this did introduce a degradation for
cpu2000 benchmark galgel. I'm seeing about -10% on PowerPC.


-- 

pthaugen at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pthaugen at gcc dot gnu dot
   ||org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45648



[Bug fortran/45648] [4.6 regression] Unnecessary temporary for transpose calls as actual argument.

2010-09-20 Thread pthaugen at gcc dot gnu dot org


--- Comment #4 from pthaugen at gcc dot gnu dot org  2010-09-20 20:45 
---
(In reply to comment #2)
 Created an attachment (id=21777)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21777action=view) [edit]
 patch restoring the previous behaviour. 
 

Applying this patch restored the performance.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45648



[Bug fortran/45648] [4.6 regression] Unnecessary temporary for transpose calls as actual argument.

2010-09-20 Thread mikael at gcc dot gnu dot org


--- Comment #5 from mikael at gcc dot gnu dot org  2010-09-20 22:26 ---
(In reply to comment #4)
 (In reply to comment #2)
  Created an attachment (id=21777)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21777action=view) [edit]
  patch restoring the previous behaviour. 
  
 
 Applying this patch restored the performance.
 
Sorry, the patch is missing the 5/5 part of the patch set I have just posted at 
http://gcc.gnu.org/ml/fortran/2010-09/msg00364.html

Without it, gfortran over-optimizes function calls with transposed aliasing
arguments.  


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45648



[Bug fortran/45648] [4.6 regression] Unnecessary temporary for transpose calls as actual argument.

2010-09-20 Thread mikael at gcc dot gnu dot org


--- Comment #6 from mikael at gcc dot gnu dot org  2010-09-20 22:29 ---
Created an attachment (id=21853)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21853action=view)
Updated patch

I attach the full updated patch for convenience. 


-- 

mikael at gcc dot gnu dot org changed:

   What|Removed |Added

  Attachment #21777|0   |1
is obsolete||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45648



[Bug fortran/45648] [4.6 regression] Unnecessary temporary for transpose calls as actual argument.

2010-09-11 Thread mikael at gcc dot gnu dot org


-- 

mikael at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |mikael at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-09-11 10:07:39
   date||
Summary|[4.6 regression] Unnecessary|[4.6 regression] Unnecessary
   |temporary for transpose |temporary for transpose
   |calls as actual argument.   |calls as actual argument.
   Target Milestone|--- |4.6.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45648



[Bug fortran/45648] [4.6 regression] Unnecessary temporary for transpose calls as actual argument.

2010-09-11 Thread mikael at gcc dot gnu dot org


--- Comment #1 from mikael at gcc dot gnu dot org  2010-09-11 16:32 ---
The patch where the transpose optimization appeared
http://gcc.gnu.org/ml/gcc-patches/2005-08/msg01472.html

There is a testcase there, I will probably incorporate it into the testsuite. 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45648



[Bug fortran/45648] [4.6 regression] Unnecessary temporary for transpose calls as actual argument.

2010-09-11 Thread mikael at gcc dot gnu dot org


--- Comment #2 from mikael at gcc dot gnu dot org  2010-09-11 17:01 ---
Created an attachment (id=21777)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21777action=view)
patch restoring the previous behaviour. 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45648