This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug middle-end/32911] Function __attribute__ ((idempotent))
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: walters at verbum dot org <gcc-bugzilla at gcc dot gnu dot org>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 May 2012 17:57:01 +0200
- Subject: Re: [Bug middle-end/32911] Function __attribute__ ((idempotent))
- References: <bug-32911-4@http.gcc.gnu.org/bugzilla/> <bug-32911-4-58sZP8GXgJ@http.gcc.gnu.org/bugzilla/>
Note that I was thinking of similar attribute for C++ iostream initialization code.
Currently every unit including iostream gets a call to the iostream constructor. With LTO
we merge the constructors together and get _alot_ of redundant calls to the construction
code. Declaring that only first call is needed would save some (quite minor) startup
overehead. (overhead of iostream startup is large, but after inlning all together it
boils down to cca 7000 redundant calls in Mozilla startup that executes quite quickly)