This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to purify some functions.
- To: hubicka at atrey dot karlin dot mff dot cuni dot cz
- Subject: Re: Patch to purify some functions.
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Thu, 20 Apr 2000 08:23:55 -0700
- Cc: egcs-patches at egcs dot cygnus dot com, rth at cygnus dot com
- Organization: CodeSourcery, LLC
- References: <20000420160740.I9657@atrey.karlin.mff.cuni.cz>
Jan --
I've been profiling the compiler a lot lately. I haven't seen most
of those functions to be hot spots.
And adding the attribute is risky: someone might forget that the
attribute is there, and add something non-pure to the function. Then,
months later something will go awry and it will take a lot of work to
track it down.
In the end, we want to do interprocedural and whole-program
analysis. The compiler should figure out those functions are pure and
use that during optimization. For now, I would just do nothing --
unless you can that the changes make a substantial difference in
compile-time performance, or a huge difference in space.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com