aboutsummaryrefslogtreecommitdiff
path: root/gcc/dfp.cc
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2023-08-04 13:50:53 +0100
committerTamar Christina <tamar.christina@arm.com>2023-08-04 13:50:53 +0100
commit73b98860767ac03aa31ad4ca8b73f40484bd7562 (patch)
tree2eadd043502b52f267c5b0fe449c57596c4a5acc /gcc/dfp.cc
parent451391a6477f5b012faeca42cdba1bfb8e6eecc0 (diff)
downloadgcc-73b98860767ac03aa31ad4ca8b73f40484bd7562.zip
gcc-73b98860767ac03aa31ad4ca8b73f40484bd7562.tar.gz
gcc-73b98860767ac03aa31ad4ca8b73f40484bd7562.tar.bz2
frontend: Add novector C++ pragma
FORTRAN currently has a pragma NOVECTOR for indicating that vectorization should not be applied to a particular loop. ICC/ICX also has such a pragma for C and C++ called #pragma novector. As part of this patch series I need a way to easily turn off vectorization of particular loops, particularly for testsuite reasons. This patch proposes a #pragma GCC novector that does the same for C++ as gfortan does for FORTRAN and what ICX/ICX does for C++. I added only some basic tests here, but the next patch in the series uses this in the testsuite in about ~800 tests. gcc/cp/ChangeLog: * cp-tree.h (RANGE_FOR_NOVECTOR): New. (cp_convert_range_for, finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Add novector param. * init.cc (build_vec_init): Default novector to false. * method.cc (build_comparison_op): Likewise. * parser.cc (cp_parser_statement): Likewise. (cp_parser_for, cp_parser_c_for, cp_parser_range_for, cp_convert_range_for, cp_parser_iteration_statement, cp_parser_omp_for_loop, cp_parser_pragma): Support novector. (cp_parser_pragma_novector): New. * pt.cc (tsubst_expr): Likewise. * semantics.cc (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise. gcc/ChangeLog: * doc/extend.texi: Document it. gcc/testsuite/ChangeLog: * g++.dg/vect/vect.exp (support vect- prefix). * g++.dg/vect/vect-novector-pragma.cc: New test.
Diffstat (limited to 'gcc/dfp.cc')
0 files changed, 0 insertions, 0 deletions