This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug tree-optimization/21712] missed optimization due with const function and pulling out of loops


------- Additional Comments From rakdver at atrey dot karlin dot mff dot cuni dot cz  2005-05-22 21:50 -------
Subject: Re:  missed optimization due with const function and pulling out of loops

> const is different from pure, const cannot read from memory.

this is something that have been discussed many times; some people like
the definition with "behaves like if" (that enables you for example to
cache or precompute the results of the function) more, and it is used in
several existing programs.  Anyway, the argument that the function may
be costly is valid regardless of whether you want to strictly enforce
the no memory access constraint, or whether you use the more useful
definition.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21712


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