This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: New GCC options for loop vectorization
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Xinliang David Li <davidxl at google dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 13 Sep 2013 16:45:03 +0000
- Subject: Re: New GCC options for loop vectorization
- Authentication-results: sourceware.org; auth=none
- References: <CAAkRFZJzPkDJe=y2RqDwXsegN1So-u8mvUM2Cc2=4yZm29ip5g at mail dot gmail dot com> <CAFiYyc204YzVZVSOKnzomiMZs0Spe7=8AMUz+ho-xzr6beahXg at mail dot gmail dot com>
On Fri, 13 Sep 2013, Richard Biener wrote:
> @@ -1691,6 +1695,12 @@ common_handle_option (struct gcc_options
> opts->x_flag_ipa_reference = false;
> break;
>
> + case OPT_ftree_vectorize:
> + if (!opts_set->x_flag_tree_loop_vectorize)
> + opts->x_flag_tree_loop_vectorize = value;
> + if (!opts_set->x_flag_tree_slp_vectorize)
> + opts->x_flag_tree_slp_vectorize = value;
> + break;
>
> doesn't look obviously correct. Does that handle
It looks right to me. The general principle is that the more specific
option takes precedence over the less specific one, whatever the order on
the command line.
> -ftree-vectorize -fno-tree-loop-vectorize -ftree-vectorize
Should mean -ftree-slp-vectorize.
> -ftree-loop-vectorize -fno-tree-vectorize
Should mean -ftree-loop-vectorize.
> -ftree-slp-vectorize -fno-tree-vectorize
Should mean -ftree-slp-vectorize.
--
Joseph S. Myers
joseph@codesourcery.com