aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop-manip.cc
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2023-08-04 13:51:16 +0100
committerTamar Christina <tamar.christina@arm.com>2023-08-04 13:51:16 +0100
commit6fb5da03107f48e0b76f123933edcc07bae7e0aa (patch)
tree8b026baee20f920eac7655bbdf012ec416074abe /gcc/tree-vect-loop-manip.cc
parent73b98860767ac03aa31ad4ca8b73f40484bd7562 (diff)
downloadgcc-6fb5da03107f48e0b76f123933edcc07bae7e0aa.zip
gcc-6fb5da03107f48e0b76f123933edcc07bae7e0aa.tar.gz
gcc-6fb5da03107f48e0b76f123933edcc07bae7e0aa.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/c-family/ChangeLog: * c-pragma.h (enum pragma_kind): Add PRAGMA_NOVECTOR. * c-pragma.cc (init_pragma): Use it. gcc/c/ChangeLog: * c-parser.cc (c_parser_while_statement, c_parser_do_statement, c_parser_for_statement, c_parser_statement_after_labels, c_parse_pragma_novector, c_parser_pragma): Wire through novector and default to false. gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-novector-pragma.c: New test.
Diffstat (limited to 'gcc/tree-vect-loop-manip.cc')
0 files changed, 0 insertions, 0 deletions