diff options
author | Nathan Sidwell <nathan@acm.org> | 2020-09-09 12:29:05 -0700 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2020-09-09 12:37:21 -0700 |
commit | 749476b4be1f8ddf482910f907a5b56eb5f3e138 (patch) | |
tree | 971fc51a9c76424446a0db3066a7fafcc6643c0b /gcc/tree-vectorizer.h | |
parent | 782d3ea603c9ad26176136ffb39481a720246be1 (diff) | |
download | gcc-749476b4be1f8ddf482910f907a5b56eb5f3e138.zip gcc-749476b4be1f8ddf482910f907a5b56eb5f3e138.tar.gz gcc-749476b4be1f8ddf482910f907a5b56eb5f3e138.tar.bz2 |
c++: omp reduction cleanups
omp reductions are modeled as nested functions, which is a thing C++
doesn't have. Leading to much confusion until I figured out what was
happening. Not helped by some duplicate code and inconsistencies in
the dependent and non-dependent paths. This patch removes the parser
duplication and fixes up some bookkeeping. Added some asserts and
comments too.
gcc/cp/
* parser.c (cp_parser_omp_declare_reduction): Refactor to avoid
code duplication. Update DECL_TI_TEMPLATE's context.
* pt.c (tsubst_expr): For OMP reduction function, set context to
global_namespace before pushing.
(tsubst_omp_udr): Assert current_function_decl, add comment about
decl context.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions