[Bug fortran/43665] Optimization of libgfortran calls: function annotations for noclobber/noescape arguments
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Apr 6 13:51:00 GMT 2010
------- 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
More information about the Gcc-bugs
mailing list