This is the mail archive of the gcc-patches@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: Patch to purify some functions.



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

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