This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Yet another function attribute?


> On Aug 20, 1999, Jan Hubicka <hubicka@atrey.karlin.mff.cuni.cz> wrote:
> 
> > Do you think it worth the implementation? Any suggestion for name of the
> > atribute? (readonly comes into mind :)
> 
> stateless?  idempotent?
Interesting ideas. Here is another one:
While implementing it (I am just doing last checks for first part of
patch to handle such functions and detect them automatically)
I found that it match closely "side_effects" attribute in gcc.
So maybe "noside_effects" can be good name. But it does not represent
the fact, that function also must be deterministics, so possibly
someone will tend to add "noside_effects" to functions like inport,
where it is wrong.
Other is "readmemoryonly" attribute, but rather long name.

(BTW it find roughly 300 such functions in gcc sources (only static
ones are checked) and saves 8% of size in XaoS binarry)

Honza
> 
> -- 
> Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
> oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
> oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
> ** I may forward mail about projects to mailing lists; please use them

-- 
                       OK. Lets make a signature file.
+-------------------------------------------------------------------------+
|        Jan Hubicka (Jan Hubi\v{c}ka in TeX) hubicka@freesoft.cz         |
|         Czech free software foundation: http://www.freesoft.cz          |
|AA project - the new way for computer graphics - http://www.ta.jcu.cz/aa |
|  homepage: http://www.paru.cas.cz/~hubicka/, games koules, Xonix, fast  |
|  fractal zoomer XaoS, index of Czech GNU/Linux/UN*X documentation etc.  | 
+-------------------------------------------------------------------------+


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]