[Bug fortran/43665] Optimization of libgfortran calls: function annotations for noclobber/noescape arguments

2010-07-13 Thread burnus at gcc dot gnu dot org


--- Comment #4 from burnus at gcc dot gnu dot org  2010-07-13 13:21 ---
Subject: Bug 43665

Author: burnus
Date: Tue Jul 13 13:20:52 2010
New Revision: 162140

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=162140
Log:
2010-07-13  Daniel Franke  franke.dan...@gmail.com
Tobias Burnus  bur...@net-b.de

PR fortran/43665
* trans-decl.c (gfc_build_intrinsic_function_decls): Add
noclobber/noescape annotations to function calls.
(gfc_build_builtin_function_decls): Likewise.


Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-decl.c


-- 


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



[Bug fortran/43665] Optimization of libgfortran calls: function annotations for noclobber/noescape arguments

2010-07-13 Thread burnus at gcc dot gnu dot org


--- Comment #5 from burnus at gcc dot gnu dot org  2010-07-13 17:26 ---
Subject: Bug 43665

Author: burnus
Date: Tue Jul 13 17:26:02 2010
New Revision: 162147

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=162147
Log:
2010-07-13  Tobias Burnus  bur...@net-b.de
Daniel Franke  franke.dan...@gmail.com

PR fortran/43665
* trans.h (gfc_build_library_function_decl_with_spec): New
prototype.
* trans-decl.c (gfc_build_library_function_decl_with_spec):
Removed static.
* trans-io (gfc_build_io_library_fndecls): Add fn spec
annotations.


Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-decl.c
trunk/gcc/fortran/trans-io.c
trunk/gcc/fortran/trans.h


-- 


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



[Bug fortran/43665] Optimization of libgfortran calls: function annotations for noclobber/noescape arguments

2010-05-13 Thread dfranke at gcc dot gnu dot org


--- Comment #3 from dfranke at gcc dot gnu dot org  2010-05-13 10:31 ---
Initial patch (trans-decl.c, trans.io.c) here:
http://gcc.gnu.org/ml/fortran/2010-05/msg00124.html

Mapping formal arguments to fnspec should be doable, but I'm experienced enough
in tree-things to continue.


-- 

dfranke at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||dfranke at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-05-13 10:31:22
   date||


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



[Bug fortran/43665] Optimization of libgfortran calls: function annotations for noclobber/noescape arguments

2010-05-10 Thread burnus at gcc dot gnu dot org


--- Comment #2 from burnus at gcc dot gnu dot org  2010-05-10 10:10 ---
I/O: Currently both READ an WRITE map to the same function; this should be
changed such that for WRITE the arguments are marked as EAF_NOCLOBBER. This can
be done using aliases, cf. http://gcc.gnu.org/ml/fortran/2010-05/msg00048.html

For the committal of the middle-end / front end, see
- http://gcc.gnu.org/ml/fortran/2010-05/msg00092.html (committal)
- http://gcc.gnu.org/ml/fortran/2010-05/msg00032.html (patch)


-- 


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



[Bug fortran/43665] Optimization of libgfortran calls: function annotations for noclobber/noescape arguments

2010-04-06 Thread burnus at gcc dot gnu dot org


--- Comment #1 from burnus at gcc dot gnu dot org  2010-04-06 13:50 ---
Some more quotes:

 You can mark parameters 1) unused, 2) pointed-to read-only,
 3) not escaping, 4) only once dereferenced (thus, access only
 *p, not **p)

 You can mark return values as being a direct copy of arguments
 or as non-aliasing (similar to the malloc attribute).

+   attr = lookup_attribute (fnspec, TYPE_ATTRIBUTES (type));

+   switch (TREE_STRING_POINTER (attr)[1 + arg])
+ {
+ case 'x':
+ case 'X':
+   return EAF_UNUSED;
+ 
+ case 'R':
+   return EAF_DIRECT | EAF_NOCLOBBER | EAF_NOESCAPE;
+ 
+ case 'r':
+   return EAF_NOCLOBBER | EAF_NOESCAPE;
+ 
+ case 'W':
+   return EAF_DIRECT | EAF_NOESCAPE;
+ 
+ case 'w':
+   return EAF_NOESCAPE;


-- 


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