Patch to purify some functions.
Mark Mitchell
mark@codesourcery.com
Thu Apr 20 08:15:00 GMT 2000
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
More information about the Gcc-patches
mailing list