This is the mail archive of the gcc-help@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]

Re: Re : Tr : [redundency elimination, code motion, commun expression elimination] GCC optimizations


charfi asma <charfiasma@yahoo.fr> writes:
> this is the simplified code that GCC did not optimize when I compile
> the C++ code using -Os. (I used GCC: (GNU) 4.6.0 20110218 ) perhaps it
> deals with GCC intra optimizations ...

Using this example code, gcc 4.6.1 also doesn't merge the if-blocks for
me either (with -O2 or -Os).

gcc 4.7 (Debian 20110924-1) _does_ merge the if-blocks with -O2, but
_not_ with -Os.  [this seems slightly odd; isn't this kind of
tail-merging almost guaranteed to be a big win for -Os?]

-Mile

-- 
Defenceless, adj. Unable to attack.


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