This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Enable GCC with CMOVxx
- From: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- To: "Lingchuan (LC) Meng" <lingchuanmeng at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 20 Jul 2009 18:15:42 -0400
- Subject: Re: Enable GCC with CMOVxx
- References: <a0a3dc690907201437q4d1ab69sf05a765193fdb7f7@mail.gmail.com>
On Mon, Jul 20, 2009 at 05:37:29PM -0400, Lingchuan (LC) Meng wrote:
> Hi all,
>
> I'm trying to enable gcc 4.3.2 on Ubuntu to compile C code with
> support of conditional moves. (and Conditional Moves as the only
> enabled optimization)
>
> I can see CMOVxx in the assembly compiled with "-O" option. However,
> no CMOVxx is found in the assembly generated with just
> "-fif-conversion" option.
>
> More surprisingly (well, at least to me), I listed all the enabled
> optimization options of "-O", and put them in one line. Then I
> compiled the same code as:
Several optimizations require a certain optimization level, and are not done
even if you specify the -f option. If conversion is one such optimization,
where the functions gate_handle_if_conversion and
gate_handle_if_conversion_after_combine, and
gate_handle_if_conversion_after_reload in ifcvt.c all have explicit tests for
optimize being greater than 0 in addition to the -f option flag(s). I would
suspect this is because if conversion needs some of the dataflow passes that
are not normally run for -O0. From the ChangeLogs, it looks like the functions
were originally added in July 2005.
--
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
meissner@linux.vnet.ibm.com