------- Comment #53 from dominiq at lps dot ens dot fr  2010-03-20 14:40 -------
> optimize_function_for_size_p (cfun) is true if attribute(cold) is set
> on it or we are optimizing for size.

It is what is presently implemented. As a consequence (illustrated by this pr),
optimize for speed is not obeyed if attribute(cold) is set on. I don't see the
interest of that: If I want optimization for speed, I just want it.

>From comment #47, I got the impression that the intended behavior is the
following:
if optimized for size is on (-Os) then it is overridden if the block is marked
as "hot" (it is not clear for me that it is !attribute(cold)). From this
impression the truth table I expect is the following for
optimize_function_for_size_p:

"hot"        0      1
-Os         1      0
-O[1-3]  0     0

and not

"cold"       0    1
-Os          1    1
-O[1-3]  0    1

as presently implemented.


-- 


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

Reply via email to