This is the mail archive of the gcc-patches@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: [PATCH] Merging Cilk Plus into Trunk (Patch 1 of approximately 22)


Hello Richard,
	I forgot to answer one of questions. Please see it below:

Thanks,

Balaji V. Iyer.


>+static tree
>+handle_vector_attribute (tree *node, tree name ATTRIBUTE_UNUSED,
>+			 tree args ATTRIBUTE_UNUSED,
>+			 int ARG_UNUSED (flags), bool *no_add_attrs) {
>+  tree opt_list;
>+  VEC(tree,gc) *opt_vec = NULL;
>+  opt_vec = make_tree_vector ();
>+  VEC_safe_push (tree, gc, opt_vec, build_string (2, "O3"));
>+  opt_list = build_tree_list_vec (opt_vec);
>+  release_tree_vector (opt_vec);
>+  handle_optimize_attribute (node, get_identifier ("optimize"), opt_list,
>+			     flags, no_add_attrs);
>
>Please no - do not use "optimize" attributes from inside the implementation.
>What happens if the user also specifies an optimize attribute?
>The above also doesnt' make sense to me, so please elaborate on why you want
>to enable -O3 for a function marked with the vector attribute.

The reason why I used optimize is because I would like to turn on the vectorizer. As far as I can tell, the only way to do that is to have -O3. Please advise if there is a better way to do so.


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