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.